OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/extensions/extension_apitest.h" | 5 #include "chrome/browser/extensions/extension_apitest.h" |
6 #include "net/base/mock_host_resolver.h" | 6 #include "net/base/mock_host_resolver.h" |
7 | 7 |
8 class ExecuteScriptApiTest : public ExtensionApiTest { | 8 class ExecuteScriptApiTest : public ExtensionApiTest { |
9 protected: | 9 protected: |
10 void SetupDelayedHostResolver() { | 10 void SetupDelayedHostResolver() { |
(...skipping 18 matching lines...) Expand all Loading... |
29 ASSERT_TRUE(RunExtensionTest("executescript/in_frame")) << message_; | 29 ASSERT_TRUE(RunExtensionTest("executescript/in_frame")) << message_; |
30 } | 30 } |
31 | 31 |
32 IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, ExecuteScriptPermissions) { | 32 IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, ExecuteScriptPermissions) { |
33 SetupDelayedHostResolver(); | 33 SetupDelayedHostResolver(); |
34 ASSERT_TRUE(StartTestServer()); | 34 ASSERT_TRUE(StartTestServer()); |
35 ASSERT_TRUE(RunExtensionTest("executescript/permissions")) << message_; | 35 ASSERT_TRUE(RunExtensionTest("executescript/permissions")) << message_; |
36 } | 36 } |
37 | 37 |
38 // If failing, mark disabled and update http://crbug.com/84760. | 38 // If failing, mark disabled and update http://crbug.com/84760. |
39 IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, | 39 IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, ExecuteScriptFileAfterClose) { |
40 ExecuteScriptFileAfterClose) { | |
41 host_resolver()->AddRule("b.com", "127.0.0.1"); | 40 host_resolver()->AddRule("b.com", "127.0.0.1"); |
42 ASSERT_TRUE(StartTestServer()); | 41 ASSERT_TRUE(StartTestServer()); |
43 ASSERT_TRUE(RunExtensionTest("executescript/file_after_close")) << message_; | 42 ASSERT_TRUE(RunExtensionTest("executescript/file_after_close")) << message_; |
44 } | 43 } |
45 | 44 |
46 // If crashing, mark disabled and update http://crbug.com/67774. | 45 // If crashing, mark disabled and update http://crbug.com/67774. |
47 IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, ExecuteScriptFragmentNavigation) { | 46 IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, ExecuteScriptFragmentNavigation) { |
48 ASSERT_TRUE(StartTestServer()); | 47 ASSERT_TRUE(StartTestServer()); |
49 const char* extension_name = "executescript/fragment"; | 48 const char* extension_name = "executescript/fragment"; |
50 ASSERT_TRUE(RunExtensionTest(extension_name)) << message_; | 49 ASSERT_TRUE(RunExtensionTest(extension_name)) << message_; |
(...skipping 26 matching lines...) Expand all Loading... |
77 SetupDelayedHostResolver(); | 76 SetupDelayedHostResolver(); |
78 ASSERT_TRUE(StartTestServer()); | 77 ASSERT_TRUE(StartTestServer()); |
79 ASSERT_TRUE(RunExtensionTest("executescript/run_at")) << message_; | 78 ASSERT_TRUE(RunExtensionTest("executescript/run_at")) << message_; |
80 } | 79 } |
81 | 80 |
82 IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, ExecuteScriptCallback) { | 81 IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, ExecuteScriptCallback) { |
83 SetupDelayedHostResolver(); | 82 SetupDelayedHostResolver(); |
84 ASSERT_TRUE(StartTestServer()); | 83 ASSERT_TRUE(StartTestServer()); |
85 ASSERT_TRUE(RunExtensionTest("executescript/callback")) << message_; | 84 ASSERT_TRUE(RunExtensionTest("executescript/callback")) << message_; |
86 } | 85 } |
OLD | NEW |