OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/guest_view/web_view/web_view_apitest.h" | 5 #include "extensions/browser/guest_view/web_view/web_view_apitest.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 AppShellTest::SetUpCommandLine(command_line); | 186 AppShellTest::SetUpCommandLine(command_line); |
187 command_line->AppendSwitchASCII(::switches::kJavaScriptFlags, "--expose-gc"); | 187 command_line->AppendSwitchASCII(::switches::kJavaScriptFlags, "--expose-gc"); |
188 } | 188 } |
189 | 189 |
190 void WebViewAPITest::SetUpOnMainThread() { | 190 void WebViewAPITest::SetUpOnMainThread() { |
191 AppShellTest::SetUpOnMainThread(); | 191 AppShellTest::SetUpOnMainThread(); |
192 | 192 |
193 TestGetConfigFunction::set_test_config_state(&test_config_); | 193 TestGetConfigFunction::set_test_config_state(&test_config_); |
194 base::FilePath test_data_dir; | 194 base::FilePath test_data_dir; |
195 test_config_.SetInteger(kTestWebSocketPort, 0); | 195 test_config_.SetInteger(kTestWebSocketPort, 0); |
196 bool isolate_extensions = base::CommandLine::ForCurrentProcess()->HasSwitch( | 196 bool isolate_extensions = true; |
197 ::switches::kSitePerProcess) || | |
198 base::CommandLine::ForCurrentProcess()->HasSwitch( | |
199 extensions::switches::kIsolateExtensions); | |
200 test_config_.SetBoolean(kIsolateExtensions, isolate_extensions); | 197 test_config_.SetBoolean(kIsolateExtensions, isolate_extensions); |
201 } | 198 } |
202 | 199 |
203 void WebViewAPITest::StartTestServer() { | 200 void WebViewAPITest::StartTestServer() { |
204 // For serving guest pages. | 201 // For serving guest pages. |
205 if (!embedded_test_server()->Start()) { | 202 if (!embedded_test_server()->Start()) { |
206 LOG(ERROR) << "Failed to start test server."; | 203 LOG(ERROR) << "Failed to start test server."; |
207 return; | 204 return; |
208 } | 205 } |
209 | 206 |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 // This test verifies that webview.contentWindow works inside an iframe | 731 // This test verifies that webview.contentWindow works inside an iframe |
735 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestWebViewInsideFrame) { | 732 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestWebViewInsideFrame) { |
736 LaunchApp("web_view/inside_iframe"); | 733 LaunchApp("web_view/inside_iframe"); |
737 } | 734 } |
738 | 735 |
739 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestCaptureVisibleRegion) { | 736 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestCaptureVisibleRegion) { |
740 RunTest("testCaptureVisibleRegion", "web_view/apitest"); | 737 RunTest("testCaptureVisibleRegion", "web_view/apitest"); |
741 } | 738 } |
742 | 739 |
743 } // namespace extensions | 740 } // namespace extensions |
OLD | NEW |