| 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
| 7 #include "net/dns/mock_host_resolver.h" | 7 #include "net/dns/mock_host_resolver.h" |
| 8 | 8 |
| 9 class ExecuteScriptApiTest : public ExtensionApiTest { | 9 class ExecuteScriptApiTest : public ExtensionApiTest { |
| 10 protected: | 10 protected: |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 ASSERT_TRUE(RunExtensionTest("../bad")) << message_; | 30 ASSERT_TRUE(RunExtensionTest("../bad")) << message_; |
| 31 } | 31 } |
| 32 | 32 |
| 33 // If failing, mark disabled and update http://crbug.com/92105. | 33 // If failing, mark disabled and update http://crbug.com/92105. |
| 34 IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, ExecuteScriptInFrame) { | 34 IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, ExecuteScriptInFrame) { |
| 35 SetupDelayedHostResolver(); | 35 SetupDelayedHostResolver(); |
| 36 ASSERT_TRUE(StartEmbeddedTestServer()); | 36 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 37 ASSERT_TRUE(RunExtensionTest("executescript/in_frame")) << message_; | 37 ASSERT_TRUE(RunExtensionTest("executescript/in_frame")) << message_; |
| 38 } | 38 } |
| 39 | 39 |
| 40 IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, ExecuteScriptByFrameId) { |
| 41 SetupDelayedHostResolver(); |
| 42 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 43 ASSERT_TRUE(RunExtensionTest("executescript/frame_id")) << message_; |
| 44 } |
| 45 |
| 40 // Fails often on Windows. | 46 // Fails often on Windows. |
| 41 // http://crbug.com/174715 | 47 // http://crbug.com/174715 |
| 42 #if defined(OS_WIN) | 48 #if defined(OS_WIN) |
| 43 #define MAYBE_ExecuteScriptPermissions DISABLED_ExecuteScriptPermissions | 49 #define MAYBE_ExecuteScriptPermissions DISABLED_ExecuteScriptPermissions |
| 44 #else | 50 #else |
| 45 #define MAYBE_ExecuteScriptPermissions ExecuteScriptPermissions | 51 #define MAYBE_ExecuteScriptPermissions ExecuteScriptPermissions |
| 46 #endif // defined(OS_WIN) | 52 #endif // defined(OS_WIN) |
| 47 | 53 |
| 48 IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, MAYBE_ExecuteScriptPermissions) { | 54 IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, MAYBE_ExecuteScriptPermissions) { |
| 49 SetupDelayedHostResolver(); | 55 SetupDelayedHostResolver(); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 SetupDelayedHostResolver(); | 130 SetupDelayedHostResolver(); |
| 125 ASSERT_TRUE(StartEmbeddedTestServer()); | 131 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 126 ASSERT_TRUE(RunExtensionTest("executescript/subframes_on_load")) << message_; | 132 ASSERT_TRUE(RunExtensionTest("executescript/subframes_on_load")) << message_; |
| 127 } | 133 } |
| 128 | 134 |
| 129 IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, RemovedFrames) { | 135 IN_PROC_BROWSER_TEST_F(ExecuteScriptApiTest, RemovedFrames) { |
| 130 SetupDelayedHostResolver(); | 136 SetupDelayedHostResolver(); |
| 131 ASSERT_TRUE(StartEmbeddedTestServer()); | 137 ASSERT_TRUE(StartEmbeddedTestServer()); |
| 132 ASSERT_TRUE(RunExtensionTest("executescript/removed_frames")) << message_; | 138 ASSERT_TRUE(RunExtensionTest("executescript/removed_frames")) << message_; |
| 133 } | 139 } |
| OLD | NEW |