| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 EXPECT_EQ( | 556 EXPECT_EQ( |
| 557 " Site A ------------ proxies for B C\n" | 557 " Site A ------------ proxies for B C\n" |
| 558 " |--Site B ------- proxies for A C\n" | 558 " |--Site B ------- proxies for A C\n" |
| 559 " +--Site C ------- proxies for A B\n" | 559 " +--Site C ------- proxies for A B\n" |
| 560 "Where A = http://127.0.0.1/\n" | 560 "Where A = http://127.0.0.1/\n" |
| 561 " B = http://foo.com/ (no process)\n" | 561 " B = http://foo.com/ (no process)\n" |
| 562 " C = http://bar.com/", | 562 " C = http://bar.com/", |
| 563 DepictFrameTree(root)); | 563 DepictFrameTree(root)); |
| 564 } | 564 } |
| 565 | 565 |
| 566 // TODO(creis): Fix and enable once initial subframe loads are fixed in Blink. |
| 567 // See https://crbug.com/498559. |
| 566 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, | 568 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, |
| 567 NavigateRemoteFrame) { | 569 DISABLED_NavigateRemoteFrame) { |
| 568 GURL main_url(embedded_test_server()->GetURL("/site_per_process_main.html")); | 570 GURL main_url(embedded_test_server()->GetURL("/site_per_process_main.html")); |
| 569 NavigateToURL(shell(), main_url); | 571 NavigateToURL(shell(), main_url); |
| 570 | 572 |
| 571 // It is safe to obtain the root frame tree node here, as it doesn't change. | 573 // It is safe to obtain the root frame tree node here, as it doesn't change. |
| 572 FrameTreeNode* root = | 574 FrameTreeNode* root = |
| 573 static_cast<WebContentsImpl*>(shell()->web_contents())-> | 575 static_cast<WebContentsImpl*>(shell()->web_contents())-> |
| 574 GetFrameTree()->root(); | 576 GetFrameTree()->root(); |
| 575 | 577 |
| 576 TestNavigationObserver observer(shell()->web_contents()); | 578 TestNavigationObserver observer(shell()->web_contents()); |
| 577 | 579 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 | 613 |
| 612 // Navigate back to the parent's origin and ensure we return to the | 614 // Navigate back to the parent's origin and ensure we return to the |
| 613 // parent's process. | 615 // parent's process. |
| 614 NavigateFrameToURL(child, http_url); | 616 NavigateFrameToURL(child, http_url); |
| 615 EXPECT_EQ(http_url, observer.last_navigation_url()); | 617 EXPECT_EQ(http_url, observer.last_navigation_url()); |
| 616 EXPECT_TRUE(observer.last_navigation_succeeded()); | 618 EXPECT_TRUE(observer.last_navigation_succeeded()); |
| 617 EXPECT_EQ(shell()->web_contents()->GetSiteInstance(), | 619 EXPECT_EQ(shell()->web_contents()->GetSiteInstance(), |
| 618 child->current_frame_host()->GetSiteInstance()); | 620 child->current_frame_host()->GetSiteInstance()); |
| 619 } | 621 } |
| 620 | 622 |
| 621 #if defined(OS_WIN) | 623 // TODO(creis): Fix and enable once initial subframe loads are fixed in Blink. |
| 622 // http://crbug.com/465722 | 624 // See https://crbug.com/498559. |
| 623 #define MAYBE_NavigateRemoteFrameToBlankAndDataURLs \ | 625 // Also disabled on Windows for https://crbug.com/465722. |
| 624 DISABLED_NavigateRemoteFrameToBlankAndDataURLs | |
| 625 #else | |
| 626 #define MAYBE_NavigateRemoteFrameToBlankAndDataURLs \ | |
| 627 NavigateRemoteFrameToBlankAndDataURLs | |
| 628 #endif | |
| 629 | |
| 630 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, | 626 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, |
| 631 MAYBE_NavigateRemoteFrameToBlankAndDataURLs) { | 627 DISABLED_NavigateRemoteFrameToBlankAndDataURLs) { |
| 632 GURL main_url(embedded_test_server()->GetURL("/site_per_process_main.html")); | 628 GURL main_url(embedded_test_server()->GetURL("/site_per_process_main.html")); |
| 633 NavigateToURL(shell(), main_url); | 629 NavigateToURL(shell(), main_url); |
| 634 | 630 |
| 635 // It is safe to obtain the root frame tree node here, as it doesn't change. | 631 // It is safe to obtain the root frame tree node here, as it doesn't change. |
| 636 FrameTreeNode* root = | 632 FrameTreeNode* root = |
| 637 static_cast<WebContentsImpl*>(shell()->web_contents())-> | 633 static_cast<WebContentsImpl*>(shell()->web_contents())-> |
| 638 GetFrameTree()->root(); | 634 GetFrameTree()->root(); |
| 639 | 635 |
| 640 TestNavigationObserver observer(shell()->web_contents()); | 636 TestNavigationObserver observer(shell()->web_contents()); |
| 641 | 637 |
| (...skipping 1883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2525 " |--Site A\n" | 2521 " |--Site A\n" |
| 2526 " +--Site A\n" | 2522 " +--Site A\n" |
| 2527 " |--Site A\n" | 2523 " |--Site A\n" |
| 2528 " +--Site A\n" | 2524 " +--Site A\n" |
| 2529 " +--Site A\n" | 2525 " +--Site A\n" |
| 2530 "Where A = http://127.0.0.1/", | 2526 "Where A = http://127.0.0.1/", |
| 2531 DepictFrameTree(root)); | 2527 DepictFrameTree(root)); |
| 2532 } | 2528 } |
| 2533 | 2529 |
| 2534 } // namespace content | 2530 } // namespace content |
| OLD | NEW |