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