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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 return visualizer_.DepictFrameTree(node); | 306 return visualizer_.DepictFrameTree(node); |
307 } | 307 } |
308 | 308 |
309 void SitePerProcessBrowserTest::SetUpCommandLine( | 309 void SitePerProcessBrowserTest::SetUpCommandLine( |
310 base::CommandLine* command_line) { | 310 base::CommandLine* command_line) { |
311 IsolateAllSitesForTesting(command_line); | 311 IsolateAllSitesForTesting(command_line); |
312 }; | 312 }; |
313 | 313 |
314 void SitePerProcessBrowserTest::SetUpOnMainThread() { | 314 void SitePerProcessBrowserTest::SetUpOnMainThread() { |
315 host_resolver()->AddRule("*", "127.0.0.1"); | 315 host_resolver()->AddRule("*", "127.0.0.1"); |
316 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 316 ASSERT_TRUE(embedded_test_server()->Start()); |
317 SetupCrossSiteRedirector(embedded_test_server()); | 317 SetupCrossSiteRedirector(embedded_test_server()); |
318 } | 318 } |
319 | 319 |
320 // Ensure that navigating subframes in --site-per-process mode works and the | 320 // Ensure that navigating subframes in --site-per-process mode works and the |
321 // correct documents are committed. | 321 // correct documents are committed. |
322 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, CrossSiteIframe) { | 322 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, CrossSiteIframe) { |
323 GURL main_url(embedded_test_server()->GetURL( | 323 GURL main_url(embedded_test_server()->GetURL( |
324 "a.com", "/cross_site_iframe_factory.html?a(a,a(a,a(a)))")); | 324 "a.com", "/cross_site_iframe_factory.html?a(a,a(a,a(a)))")); |
325 NavigateToURL(shell(), main_url); | 325 NavigateToURL(shell(), main_url); |
326 | 326 |
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1487 " Site A ------------ proxies for B\n" | 1487 " Site A ------------ proxies for B\n" |
1488 " |--Site B ------- proxies for A\n" | 1488 " |--Site B ------- proxies for A\n" |
1489 " +--Site A ------- proxies for B\n" | 1489 " +--Site A ------- proxies for B\n" |
1490 "Where A = http://b.com/\n" | 1490 "Where A = http://b.com/\n" |
1491 " B = http://baz.com/", | 1491 " B = http://baz.com/", |
1492 DepictFrameTree(root)); | 1492 DepictFrameTree(root)); |
1493 } | 1493 } |
1494 | 1494 |
1495 // TODO(nasko): Disable this test until out-of-process iframes is ready and the | 1495 // TODO(nasko): Disable this test until out-of-process iframes is ready and the |
1496 // security checks are back in place. | 1496 // security checks are back in place. |
1497 // TODO(creis): Replace SpawnedTestServer with host_resolver to get test to run | |
1498 // on Android (http://crbug.com/187570). | |
1499 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, | 1497 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, |
1500 DISABLED_CrossSiteIframeRedirectOnce) { | 1498 DISABLED_CrossSiteIframeRedirectOnce) { |
1501 ASSERT_TRUE(test_server()->Start()); | 1499 net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS); |
1502 net::SpawnedTestServer https_server( | 1500 https_server.ServeFilesFromSourceDirectory("content/test/data"); |
1503 net::SpawnedTestServer::TYPE_HTTPS, | |
1504 net::SpawnedTestServer::kLocalhost, | |
1505 base::FilePath(FILE_PATH_LITERAL("content/test/data"))); | |
1506 ASSERT_TRUE(https_server.Start()); | 1501 ASSERT_TRUE(https_server.Start()); |
1507 | 1502 |
1508 GURL main_url(test_server()->GetURL("files/site_per_process_main.html")); | 1503 GURL main_url(embedded_test_server()->GetURL("/site_per_process_main.html")); |
1509 GURL http_url(test_server()->GetURL("files/title1.html")); | 1504 GURL http_url(embedded_test_server()->GetURL("/title1.html")); |
1510 GURL https_url(https_server.GetURL("files/title1.html")); | 1505 GURL https_url(https_server.GetURL("/title1.html")); |
1511 | 1506 |
1512 NavigateToURL(shell(), main_url); | 1507 NavigateToURL(shell(), main_url); |
1513 | 1508 |
1514 TestNavigationObserver observer(shell()->web_contents()); | 1509 TestNavigationObserver observer(shell()->web_contents()); |
1515 { | 1510 { |
1516 // Load cross-site client-redirect page into Iframe. | 1511 // Load cross-site client-redirect page into Iframe. |
1517 // Should be blocked. | 1512 // Should be blocked. |
1518 GURL client_redirect_https_url(https_server.GetURL( | 1513 GURL client_redirect_https_url( |
1519 "client-redirect?files/title1.html")); | 1514 https_server.GetURL("/client-redirect?/title1.html")); |
1520 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", | 1515 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", |
1521 client_redirect_https_url)); | 1516 client_redirect_https_url)); |
1522 // DidFailProvisionalLoad when navigating to client_redirect_https_url. | 1517 // DidFailProvisionalLoad when navigating to client_redirect_https_url. |
1523 EXPECT_EQ(observer.last_navigation_url(), client_redirect_https_url); | 1518 EXPECT_EQ(observer.last_navigation_url(), client_redirect_https_url); |
1524 EXPECT_FALSE(observer.last_navigation_succeeded()); | 1519 EXPECT_FALSE(observer.last_navigation_succeeded()); |
1525 } | 1520 } |
1526 | 1521 |
1527 { | 1522 { |
1528 // Load cross-site server-redirect page into Iframe, | 1523 // Load cross-site server-redirect page into Iframe, |
1529 // which redirects to same-site page. | 1524 // which redirects to same-site page. |
1530 GURL server_redirect_http_url(https_server.GetURL( | 1525 GURL server_redirect_http_url( |
1531 "server-redirect?" + http_url.spec())); | 1526 https_server.GetURL("/server-redirect?" + http_url.spec())); |
1532 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", | 1527 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", |
1533 server_redirect_http_url)); | 1528 server_redirect_http_url)); |
1534 EXPECT_EQ(observer.last_navigation_url(), http_url); | 1529 EXPECT_EQ(observer.last_navigation_url(), http_url); |
1535 EXPECT_TRUE(observer.last_navigation_succeeded()); | 1530 EXPECT_TRUE(observer.last_navigation_succeeded()); |
1536 } | 1531 } |
1537 | 1532 |
1538 { | 1533 { |
1539 // Load cross-site server-redirect page into Iframe, | 1534 // Load cross-site server-redirect page into Iframe, |
1540 // which redirects to cross-site page. | 1535 // which redirects to cross-site page. |
1541 GURL server_redirect_http_url(https_server.GetURL( | 1536 GURL server_redirect_http_url( |
1542 "server-redirect?files/title1.html")); | 1537 https_server.GetURL("/server-redirect?/title1.html")); |
1543 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", | 1538 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", |
1544 server_redirect_http_url)); | 1539 server_redirect_http_url)); |
1545 // DidFailProvisionalLoad when navigating to https_url. | 1540 // DidFailProvisionalLoad when navigating to https_url. |
1546 EXPECT_EQ(observer.last_navigation_url(), https_url); | 1541 EXPECT_EQ(observer.last_navigation_url(), https_url); |
1547 EXPECT_FALSE(observer.last_navigation_succeeded()); | 1542 EXPECT_FALSE(observer.last_navigation_succeeded()); |
1548 } | 1543 } |
1549 | 1544 |
1550 { | 1545 { |
1551 // Load same-site server-redirect page into Iframe, | 1546 // Load same-site server-redirect page into Iframe, |
1552 // which redirects to cross-site page. | 1547 // which redirects to cross-site page. |
1553 GURL server_redirect_http_url(test_server()->GetURL( | 1548 GURL server_redirect_http_url( |
1554 "server-redirect?" + https_url.spec())); | 1549 embedded_test_server()->GetURL("/server-redirect?" + https_url.spec())); |
1555 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", | 1550 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", |
1556 server_redirect_http_url)); | 1551 server_redirect_http_url)); |
1557 | 1552 |
1558 EXPECT_EQ(observer.last_navigation_url(), https_url); | 1553 EXPECT_EQ(observer.last_navigation_url(), https_url); |
1559 EXPECT_FALSE(observer.last_navigation_succeeded()); | 1554 EXPECT_FALSE(observer.last_navigation_succeeded()); |
1560 } | 1555 } |
1561 | 1556 |
1562 { | 1557 { |
1563 // Load same-site client-redirect page into Iframe, | 1558 // Load same-site client-redirect page into Iframe, |
1564 // which redirects to cross-site page. | 1559 // which redirects to cross-site page. |
1565 GURL client_redirect_http_url(test_server()->GetURL( | 1560 GURL client_redirect_http_url( |
1566 "client-redirect?" + https_url.spec())); | 1561 embedded_test_server()->GetURL("/client-redirect?" + https_url.spec())); |
1567 | 1562 |
1568 RedirectNotificationObserver load_observer2( | 1563 RedirectNotificationObserver load_observer2( |
1569 NOTIFICATION_LOAD_STOP, | 1564 NOTIFICATION_LOAD_STOP, |
1570 Source<NavigationController>( | 1565 Source<NavigationController>( |
1571 &shell()->web_contents()->GetController())); | 1566 &shell()->web_contents()->GetController())); |
1572 | 1567 |
1573 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", | 1568 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", |
1574 client_redirect_http_url)); | 1569 client_redirect_http_url)); |
1575 | 1570 |
1576 // Same-site Client-Redirect Page should be loaded successfully. | 1571 // Same-site Client-Redirect Page should be loaded successfully. |
1577 EXPECT_EQ(observer.last_navigation_url(), client_redirect_http_url); | 1572 EXPECT_EQ(observer.last_navigation_url(), client_redirect_http_url); |
1578 EXPECT_TRUE(observer.last_navigation_succeeded()); | 1573 EXPECT_TRUE(observer.last_navigation_succeeded()); |
1579 | 1574 |
1580 // Redirecting to Cross-site Page should be blocked. | 1575 // Redirecting to Cross-site Page should be blocked. |
1581 load_observer2.Wait(); | 1576 load_observer2.Wait(); |
1582 EXPECT_EQ(observer.last_navigation_url(), https_url); | 1577 EXPECT_EQ(observer.last_navigation_url(), https_url); |
1583 EXPECT_FALSE(observer.last_navigation_succeeded()); | 1578 EXPECT_FALSE(observer.last_navigation_succeeded()); |
1584 } | 1579 } |
1585 | 1580 |
1586 { | 1581 { |
1587 // Load same-site server-redirect page into Iframe, | 1582 // Load same-site server-redirect page into Iframe, |
1588 // which redirects to same-site page. | 1583 // which redirects to same-site page. |
1589 GURL server_redirect_http_url(test_server()->GetURL( | 1584 GURL server_redirect_http_url( |
1590 "server-redirect?files/title1.html")); | 1585 embedded_test_server()->GetURL("/server-redirect?/title1.html")); |
1591 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", | 1586 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", |
1592 server_redirect_http_url)); | 1587 server_redirect_http_url)); |
1593 EXPECT_EQ(observer.last_navigation_url(), http_url); | 1588 EXPECT_EQ(observer.last_navigation_url(), http_url); |
1594 EXPECT_TRUE(observer.last_navigation_succeeded()); | 1589 EXPECT_TRUE(observer.last_navigation_succeeded()); |
1595 } | 1590 } |
1596 | 1591 |
1597 { | 1592 { |
1598 // Load same-site client-redirect page into Iframe, | 1593 // Load same-site client-redirect page into Iframe, |
1599 // which redirects to same-site page. | 1594 // which redirects to same-site page. |
1600 GURL client_redirect_http_url(test_server()->GetURL( | 1595 GURL client_redirect_http_url( |
1601 "client-redirect?" + http_url.spec())); | 1596 embedded_test_server()->GetURL("/client-redirect?" + http_url.spec())); |
1602 RedirectNotificationObserver load_observer2( | 1597 RedirectNotificationObserver load_observer2( |
1603 NOTIFICATION_LOAD_STOP, | 1598 NOTIFICATION_LOAD_STOP, |
1604 Source<NavigationController>( | 1599 Source<NavigationController>( |
1605 &shell()->web_contents()->GetController())); | 1600 &shell()->web_contents()->GetController())); |
1606 | 1601 |
1607 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", | 1602 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", |
1608 client_redirect_http_url)); | 1603 client_redirect_http_url)); |
1609 | 1604 |
1610 // Same-site Client-Redirect Page should be loaded successfully. | 1605 // Same-site Client-Redirect Page should be loaded successfully. |
1611 EXPECT_EQ(observer.last_navigation_url(), client_redirect_http_url); | 1606 EXPECT_EQ(observer.last_navigation_url(), client_redirect_http_url); |
1612 EXPECT_TRUE(observer.last_navigation_succeeded()); | 1607 EXPECT_TRUE(observer.last_navigation_succeeded()); |
1613 | 1608 |
1614 // Redirecting to Same-site Page should be loaded successfully. | 1609 // Redirecting to Same-site Page should be loaded successfully. |
1615 load_observer2.Wait(); | 1610 load_observer2.Wait(); |
1616 EXPECT_EQ(observer.last_navigation_url(), http_url); | 1611 EXPECT_EQ(observer.last_navigation_url(), http_url); |
1617 EXPECT_TRUE(observer.last_navigation_succeeded()); | 1612 EXPECT_TRUE(observer.last_navigation_succeeded()); |
1618 } | 1613 } |
1619 } | 1614 } |
1620 | 1615 |
1621 // TODO(nasko): Disable this test until out-of-process iframes is ready and the | 1616 // TODO(nasko): Disable this test until out-of-process iframes is ready and the |
1622 // security checks are back in place. | 1617 // security checks are back in place. |
1623 // TODO(creis): Replace SpawnedTestServer with host_resolver to get test to run | |
1624 // on Android (http://crbug.com/187570). | |
1625 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, | 1618 IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, |
1626 DISABLED_CrossSiteIframeRedirectTwice) { | 1619 DISABLED_CrossSiteIframeRedirectTwice) { |
1627 ASSERT_TRUE(test_server()->Start()); | 1620 net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS); |
1628 net::SpawnedTestServer https_server( | 1621 https_server.ServeFilesFromSourceDirectory("content/test/data"); |
1629 net::SpawnedTestServer::TYPE_HTTPS, | |
1630 net::SpawnedTestServer::kLocalhost, | |
1631 base::FilePath(FILE_PATH_LITERAL("content/test/data"))); | |
1632 ASSERT_TRUE(https_server.Start()); | 1622 ASSERT_TRUE(https_server.Start()); |
1633 | 1623 |
1634 GURL main_url(test_server()->GetURL("files/site_per_process_main.html")); | 1624 GURL main_url(embedded_test_server()->GetURL("/site_per_process_main.html")); |
1635 GURL http_url(test_server()->GetURL("files/title1.html")); | 1625 GURL http_url(embedded_test_server()->GetURL("/title1.html")); |
1636 GURL https_url(https_server.GetURL("files/title1.html")); | 1626 GURL https_url(https_server.GetURL("/title1.html")); |
1637 | 1627 |
1638 NavigateToURL(shell(), main_url); | 1628 NavigateToURL(shell(), main_url); |
1639 | 1629 |
1640 TestNavigationObserver observer(shell()->web_contents()); | 1630 TestNavigationObserver observer(shell()->web_contents()); |
1641 { | 1631 { |
1642 // Load client-redirect page pointing to a cross-site client-redirect page, | 1632 // Load client-redirect page pointing to a cross-site client-redirect page, |
1643 // which eventually redirects back to same-site page. | 1633 // which eventually redirects back to same-site page. |
1644 GURL client_redirect_https_url(https_server.GetURL( | 1634 GURL client_redirect_https_url( |
1645 "client-redirect?" + http_url.spec())); | 1635 https_server.GetURL("/client-redirect?" + http_url.spec())); |
1646 GURL client_redirect_http_url(test_server()->GetURL( | 1636 GURL client_redirect_http_url(embedded_test_server()->GetURL( |
1647 "client-redirect?" + client_redirect_https_url.spec())); | 1637 "/client-redirect?" + client_redirect_https_url.spec())); |
1648 | 1638 |
1649 // We should wait until second client redirect get cancelled. | 1639 // We should wait until second client redirect get cancelled. |
1650 RedirectNotificationObserver load_observer2( | 1640 RedirectNotificationObserver load_observer2( |
1651 NOTIFICATION_LOAD_STOP, | 1641 NOTIFICATION_LOAD_STOP, |
1652 Source<NavigationController>( | 1642 Source<NavigationController>( |
1653 &shell()->web_contents()->GetController())); | 1643 &shell()->web_contents()->GetController())); |
1654 | 1644 |
1655 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", | 1645 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", |
1656 client_redirect_http_url)); | 1646 client_redirect_http_url)); |
1657 | 1647 |
1658 // DidFailProvisionalLoad when navigating to client_redirect_https_url. | 1648 // DidFailProvisionalLoad when navigating to client_redirect_https_url. |
1659 load_observer2.Wait(); | 1649 load_observer2.Wait(); |
1660 EXPECT_EQ(observer.last_navigation_url(), client_redirect_https_url); | 1650 EXPECT_EQ(observer.last_navigation_url(), client_redirect_https_url); |
1661 EXPECT_FALSE(observer.last_navigation_succeeded()); | 1651 EXPECT_FALSE(observer.last_navigation_succeeded()); |
1662 } | 1652 } |
1663 | 1653 |
1664 { | 1654 { |
1665 // Load server-redirect page pointing to a cross-site server-redirect page, | 1655 // Load server-redirect page pointing to a cross-site server-redirect page, |
1666 // which eventually redirect back to same-site page. | 1656 // which eventually redirect back to same-site page. |
1667 GURL server_redirect_https_url(https_server.GetURL( | 1657 GURL server_redirect_https_url( |
1668 "server-redirect?" + http_url.spec())); | 1658 https_server.GetURL("/server-redirect?" + http_url.spec())); |
1669 GURL server_redirect_http_url(test_server()->GetURL( | 1659 GURL server_redirect_http_url(embedded_test_server()->GetURL( |
1670 "server-redirect?" + server_redirect_https_url.spec())); | 1660 "/server-redirect?" + server_redirect_https_url.spec())); |
1671 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", | 1661 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", |
1672 server_redirect_http_url)); | 1662 server_redirect_http_url)); |
1673 EXPECT_EQ(observer.last_navigation_url(), http_url); | 1663 EXPECT_EQ(observer.last_navigation_url(), http_url); |
1674 EXPECT_TRUE(observer.last_navigation_succeeded()); | 1664 EXPECT_TRUE(observer.last_navigation_succeeded()); |
1675 } | 1665 } |
1676 | 1666 |
1677 { | 1667 { |
1678 // Load server-redirect page pointing to a cross-site server-redirect page, | 1668 // Load server-redirect page pointing to a cross-site server-redirect page, |
1679 // which eventually redirects back to cross-site page. | 1669 // which eventually redirects back to cross-site page. |
1680 GURL server_redirect_https_url(https_server.GetURL( | 1670 GURL server_redirect_https_url( |
1681 "server-redirect?" + https_url.spec())); | 1671 https_server.GetURL("/server-redirect?" + https_url.spec())); |
1682 GURL server_redirect_http_url(test_server()->GetURL( | 1672 GURL server_redirect_http_url(embedded_test_server()->GetURL( |
1683 "server-redirect?" + server_redirect_https_url.spec())); | 1673 "/server-redirect?" + server_redirect_https_url.spec())); |
1684 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", | 1674 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", |
1685 server_redirect_http_url)); | 1675 server_redirect_http_url)); |
1686 | 1676 |
1687 // DidFailProvisionalLoad when navigating to https_url. | 1677 // DidFailProvisionalLoad when navigating to https_url. |
1688 EXPECT_EQ(observer.last_navigation_url(), https_url); | 1678 EXPECT_EQ(observer.last_navigation_url(), https_url); |
1689 EXPECT_FALSE(observer.last_navigation_succeeded()); | 1679 EXPECT_FALSE(observer.last_navigation_succeeded()); |
1690 } | 1680 } |
1691 | 1681 |
1692 { | 1682 { |
1693 // Load server-redirect page pointing to a cross-site client-redirect page, | 1683 // Load server-redirect page pointing to a cross-site client-redirect page, |
1694 // which eventually redirects back to same-site page. | 1684 // which eventually redirects back to same-site page. |
1695 GURL client_redirect_http_url(https_server.GetURL( | 1685 GURL client_redirect_http_url( |
1696 "client-redirect?" + http_url.spec())); | 1686 https_server.GetURL("/client-redirect?" + http_url.spec())); |
1697 GURL server_redirect_http_url(test_server()->GetURL( | 1687 GURL server_redirect_http_url(embedded_test_server()->GetURL( |
1698 "server-redirect?" + client_redirect_http_url.spec())); | 1688 "/server-redirect?" + client_redirect_http_url.spec())); |
1699 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", | 1689 EXPECT_TRUE(NavigateIframeToURL(shell()->web_contents(), "test", |
1700 server_redirect_http_url)); | 1690 server_redirect_http_url)); |
1701 | 1691 |
1702 // DidFailProvisionalLoad when navigating to client_redirect_http_url. | 1692 // DidFailProvisionalLoad when navigating to client_redirect_http_url. |
1703 EXPECT_EQ(observer.last_navigation_url(), client_redirect_http_url); | 1693 EXPECT_EQ(observer.last_navigation_url(), client_redirect_http_url); |
1704 EXPECT_FALSE(observer.last_navigation_succeeded()); | 1694 EXPECT_FALSE(observer.last_navigation_succeeded()); |
1705 } | 1695 } |
1706 } | 1696 } |
1707 | 1697 |
1708 // Ensure that when navigating a frame cross-process RenderFrameProxyHosts are | 1698 // Ensure that when navigating a frame cross-process RenderFrameProxyHosts are |
(...skipping 2086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3795 | 3785 |
3796 // Use new window to navigate main window. | 3786 // Use new window to navigate main window. |
3797 std::string script = | 3787 std::string script = |
3798 "window.opener.location.href = '" + cross_url.spec() + "'"; | 3788 "window.opener.location.href = '" + cross_url.spec() + "'"; |
3799 EXPECT_TRUE(ExecuteScript(popup->web_contents(), script)); | 3789 EXPECT_TRUE(ExecuteScript(popup->web_contents(), script)); |
3800 EXPECT_TRUE(WaitForLoadStop(shell()->web_contents())); | 3790 EXPECT_TRUE(WaitForLoadStop(shell()->web_contents())); |
3801 EXPECT_EQ(shell()->web_contents()->GetLastCommittedURL(), cross_url); | 3791 EXPECT_EQ(shell()->web_contents()->GetLastCommittedURL(), cross_url); |
3802 } | 3792 } |
3803 | 3793 |
3804 } // namespace content | 3794 } // namespace content |
OLD | NEW |