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 "content/browser/site_per_process_browsertest.h" | 5 #include "content/browser/site_per_process_browsertest.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "content/browser/frame_host/cross_process_frame_connector.h" | 9 #include "content/browser/frame_host/cross_process_frame_connector.h" |
10 #include "content/browser/frame_host/frame_tree.h" | 10 #include "content/browser/frame_host/frame_tree.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 &window->web_contents()->GetController())); | 182 &window->web_contents()->GetController())); |
183 bool result = ExecuteScript(window->web_contents(), script); | 183 bool result = ExecuteScript(window->web_contents(), script); |
184 load_observer.Wait(); | 184 load_observer.Wait(); |
185 return result; | 185 return result; |
186 } | 186 } |
187 | 187 |
188 void SitePerProcessBrowserTest::SetUpCommandLine(CommandLine* command_line) { | 188 void SitePerProcessBrowserTest::SetUpCommandLine(CommandLine* command_line) { |
189 command_line->AppendSwitch(switches::kSitePerProcess); | 189 command_line->AppendSwitch(switches::kSitePerProcess); |
190 }; | 190 }; |
191 | 191 |
192 // Ensure that we can complete a cross-process subframe navigation. | 192 // It fails on ChromeOS and Android, so disabled while investigating. |
193 // Crashes ChromeOS bot, but the bug is probably present on other platforms | 193 // http://crbug.com/399775 |
194 // also. http://crbug.com/399775 | 194 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
195 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, DISABLED_CrossSiteIframe) { | 195 #define MAYBE_CrossSiteIframe DISABLED_CrossSiteIframe |
| 196 #else |
| 197 #define MAYBE_CrossSiteIframe CrossSiteIframe |
| 198 #endif |
| 199 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, MAYBE_CrossSiteIframe) { |
196 host_resolver()->AddRule("*", "127.0.0.1"); | 200 host_resolver()->AddRule("*", "127.0.0.1"); |
197 ASSERT_TRUE(test_server()->Start()); | 201 ASSERT_TRUE(test_server()->Start()); |
198 GURL main_url(test_server()->GetURL("files/site_per_process_main.html")); | 202 GURL main_url(test_server()->GetURL("files/site_per_process_main.html")); |
199 NavigateToURL(shell(), main_url); | 203 NavigateToURL(shell(), main_url); |
200 | 204 |
201 // It is safe to obtain the root frame tree node here, as it doesn't change. | 205 // It is safe to obtain the root frame tree node here, as it doesn't change. |
202 FrameTreeNode* root = | 206 FrameTreeNode* root = |
203 static_cast<WebContentsImpl*>(shell()->web_contents())-> | 207 static_cast<WebContentsImpl*>(shell()->web_contents())-> |
204 GetFrameTree()->root(); | 208 GetFrameTree()->root(); |
205 | 209 |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 "server-redirect?" + client_redirect_http_url.spec())); | 562 "server-redirect?" + client_redirect_http_url.spec())); |
559 EXPECT_TRUE(NavigateIframeToURL(shell(), server_redirect_http_url, "test")); | 563 EXPECT_TRUE(NavigateIframeToURL(shell(), server_redirect_http_url, "test")); |
560 | 564 |
561 // DidFailProvisionalLoad when navigating to client_redirect_http_url. | 565 // DidFailProvisionalLoad when navigating to client_redirect_http_url. |
562 EXPECT_EQ(observer.navigation_url(), client_redirect_http_url); | 566 EXPECT_EQ(observer.navigation_url(), client_redirect_http_url); |
563 EXPECT_FALSE(observer.navigation_succeeded()); | 567 EXPECT_FALSE(observer.navigation_succeeded()); |
564 } | 568 } |
565 } | 569 } |
566 | 570 |
567 } // namespace content | 571 } // namespace content |
OLD | NEW |