[email protected] | c107d49 | 2012-01-30 17:59:16 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | c7ad50f | 2009-09-11 06:28:15 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #include "chrome/browser/extensions/extension_apitest.h" | ||||
[email protected] | f2cb3cf | 2013-03-21 01:40:53 | [diff] [blame] | 6 | #include "net/dns/mock_host_resolver.h" |
[email protected] | c7ad50f | 2009-09-11 06:28:15 | [diff] [blame] | 7 | |
jam | bb11ed74 | 2017-05-01 17:27:59 | [diff] [blame] | 8 | class JavscriptApiTest : public ExtensionApiTest { |
9 | public: | ||||
10 | void SetUpOnMainThread() override { | ||||
11 | ExtensionApiTest::SetUpOnMainThread(); | ||||
12 | host_resolver()->AddRule("*", "127.0.0.1"); | ||||
13 | ASSERT_TRUE(StartEmbeddedTestServer()); | ||||
14 | } | ||||
15 | }; | ||||
[email protected] | c7ad50f | 2009-09-11 06:28:15 | [diff] [blame] | 16 | |
jam | bb11ed74 | 2017-05-01 17:27:59 | [diff] [blame] | 17 | // If crashing, mark disabled and update http://crbug.com/63589. |
18 | IN_PROC_BROWSER_TEST_F(JavscriptApiTest, JavaScriptURLPermissions) { | ||||
[email protected] | ad6530c | 2009-12-17 19:43:56 | [diff] [blame] | 19 | ASSERT_TRUE(RunExtensionTest("tabs/javascript_url_permissions")) << message_; |
[email protected] | c7ad50f | 2009-09-11 06:28:15 | [diff] [blame] | 20 | } |
limasdf | 7efa2aa | 2015-07-20 17:31:00 | [diff] [blame] | 21 | |
jam | bb11ed74 | 2017-05-01 17:27:59 | [diff] [blame] | 22 | IN_PROC_BROWSER_TEST_F(JavscriptApiTest, JavasScriptEncodedURL) { |
limasdf | 7efa2aa | 2015-07-20 17:31:00 | [diff] [blame] | 23 | ASSERT_TRUE(RunExtensionTest("tabs/javascript_url_encoded")) << message_; |
24 | } |