| 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 "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "content/browser/frame_host/cross_process_frame_connector.h" | 10 #include "content/browser/frame_host/cross_process_frame_connector.h" |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 | 330 |
| 331 // Navigate back to the parent's origin and ensure we return to the | 331 // Navigate back to the parent's origin and ensure we return to the |
| 332 // parent's process. | 332 // parent's process. |
| 333 NavigateFrameToURL(child, http_url); | 333 NavigateFrameToURL(child, http_url); |
| 334 EXPECT_EQ(http_url, observer.last_navigation_url()); | 334 EXPECT_EQ(http_url, observer.last_navigation_url()); |
| 335 EXPECT_TRUE(observer.last_navigation_succeeded()); | 335 EXPECT_TRUE(observer.last_navigation_succeeded()); |
| 336 EXPECT_EQ(shell()->web_contents()->GetSiteInstance(), | 336 EXPECT_EQ(shell()->web_contents()->GetSiteInstance(), |
| 337 child->current_frame_host()->GetSiteInstance()); | 337 child->current_frame_host()->GetSiteInstance()); |
| 338 } | 338 } |
| 339 | 339 |
| 340 #if defined(OS_WIN) |
| 341 // http://crbug.com/446575 |
| 342 #define MAYBE_NavigateRemoteFrameToBlankAndDataURLs \ |
| 343 DISABLED_NavigateRemoteFrameToBlankAndDataURLs |
| 344 #else |
| 345 #define MAYBE_NavigateRemoteFrameToBlankAndDataURLs \ |
| 346 NavigateRemoteFrameToBlankAndDataURLs |
| 347 #endif |
| 348 |
| 340 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, | 349 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, |
| 341 NavigateRemoteFrameToBlankAndDataURLs) { | 350 MAYBE_NavigateRemoteFrameToBlankAndDataURLs) { |
| 342 GURL main_url(embedded_test_server()->GetURL("/site_per_process_main.html")); | 351 GURL main_url(embedded_test_server()->GetURL("/site_per_process_main.html")); |
| 343 NavigateToURL(shell(), main_url); | 352 NavigateToURL(shell(), main_url); |
| 344 | 353 |
| 345 // It is safe to obtain the root frame tree node here, as it doesn't change. | 354 // It is safe to obtain the root frame tree node here, as it doesn't change. |
| 346 FrameTreeNode* root = | 355 FrameTreeNode* root = |
| 347 static_cast<WebContentsImpl*>(shell()->web_contents())-> | 356 static_cast<WebContentsImpl*>(shell()->web_contents())-> |
| 348 GetFrameTree()->root(); | 357 GetFrameTree()->root(); |
| 349 | 358 |
| 350 TestNavigationObserver observer(shell()->web_contents()); | 359 TestNavigationObserver observer(shell()->web_contents()); |
| 351 | 360 |
| (...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1642 TitleWatcher title_watcher(shell()->web_contents(), expected_title); | 1651 TitleWatcher title_watcher(shell()->web_contents(), expected_title); |
| 1643 TestNavigationObserver observer(shell()->web_contents()); | 1652 TestNavigationObserver observer(shell()->web_contents()); |
| 1644 NavigateFrameToURL(root->child_at(0), foo_url); | 1653 NavigateFrameToURL(root->child_at(0), foo_url); |
| 1645 EXPECT_TRUE(observer.last_navigation_succeeded()); | 1654 EXPECT_TRUE(observer.last_navigation_succeeded()); |
| 1646 EXPECT_EQ(foo_url, observer.last_navigation_url()); | 1655 EXPECT_EQ(foo_url, observer.last_navigation_url()); |
| 1647 EXPECT_EQ(title_watcher.WaitAndGetTitle(), expected_title); | 1656 EXPECT_EQ(title_watcher.WaitAndGetTitle(), expected_title); |
| 1648 } | 1657 } |
| 1649 } | 1658 } |
| 1650 | 1659 |
| 1651 } // namespace content | 1660 } // namespace content |
| OLD | NEW |