Home | History | Annotate | Download | only in web_contents

Lines Matching refs:interstitial

101         TestInterstitialPage* interstitial) = 0;
108 // |deleted| (like all interstitial related tests do at this point), make sure
113 // interstitial, as in such a case it will be destroyed in the test TearDown
226 TestInterstitialPage* interstitial) OVERRIDE {
227 DCHECK(interstitial_page_ == interstitial);
1447 // Interstitial Tests
1451 // as when a URL is typed in the location bar) that shows an interstitial and
1460 // Initiate a browser navigation that will trigger the interstitial
1464 // Show an interstitial.
1468 GURL url2("http://interstitial");
1469 TestInterstitialPage* interstitial =
1471 TestInterstitialPageStateGuard state_guard(interstitial);
1472 interstitial->Show();
1473 // The interstitial should not show until its navigation has committed.
1474 EXPECT_FALSE(interstitial->is_showing());
1477 // Let's commit the interstitial navigation.
1478 interstitial->TestDidNavigate(1, url2);
1479 EXPECT_TRUE(interstitial->is_showing());
1481 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial);
1487 interstitial->DontProceed();
1501 // as when clicking on a link in the page) that shows an interstitial and
1510 // Show an interstitial (no pending entry, the interstitial would have been
1515 GURL url2("http://interstitial");
1516 TestInterstitialPage* interstitial =
1518 TestInterstitialPageStateGuard state_guard(interstitial);
1519 interstitial->Show();
1520 // The interstitial should not show until its navigation has committed.
1521 EXPECT_FALSE(interstitial->is_showing());
1524 // Let's commit the interstitial navigation.
1525 interstitial->TestDidNavigate(1, url2);
1526 EXPECT_TRUE(interstitial->is_showing());
1528 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial);
1534 interstitial->DontProceed();
1547 // Test navigating to a page that shows an interstitial without creating a new
1548 // navigation entry (this happens when the interstitial is triggered by a
1556 // Show an interstitial.
1560 GURL url2("http://interstitial");
1561 TestInterstitialPage* interstitial =
1563 TestInterstitialPageStateGuard state_guard(interstitial);
1564 interstitial->Show();
1565 // The interstitial should not show until its navigation has committed.
1566 EXPECT_FALSE(interstitial->is_showing());
1569 // Let's commit the interstitial navigation.
1570 interstitial->TestDidNavigate(1, url2);
1571 EXPECT_TRUE(interstitial->is_showing());
1573 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial);
1576 // The URL specified to the interstitial should have been ignored.
1580 interstitial->DontProceed();
1594 // as when a URL is typed in the location bar) that shows an interstitial and
1603 // Initiate a browser navigation that will trigger the interstitial
1607 // Show an interstitial.
1611 GURL url2("http://interstitial");
1612 TestInterstitialPage* interstitial =
1614 TestInterstitialPageStateGuard state_guard(interstitial);
1615 interstitial->Show();
1616 // The interstitial should not show until its navigation has committed.
1617 EXPECT_FALSE(interstitial->is_showing());
1620 // Let's commit the interstitial navigation.
1621 interstitial->TestDidNavigate(1, url2);
1622 EXPECT_TRUE(interstitial->is_showing());
1624 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial);
1630 interstitial->Proceed();
1631 // The interstitial should show until the new navigation commits.
1636 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial);
1638 // Simulate the navigation to the page, that's when the interstitial gets
1656 // as when clicking on a link in the page) that shows an interstitial and
1665 // Show an interstitial.
1669 GURL url2("http://interstitial");
1670 TestInterstitialPage* interstitial =
1672 TestInterstitialPageStateGuard state_guard(interstitial);
1673 interstitial->Show();
1674 // The interstitial should not show until its navigation has committed.
1675 EXPECT_FALSE(interstitial->is_showing());
1678 // Let's commit the interstitial navigation.
1679 interstitial->TestDidNavigate(1, url2);
1680 EXPECT_TRUE(interstitial->is_showing());
1682 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial);
1688 interstitial->Proceed();
1689 // The interstitial should show until the new navigation commits.
1694 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial);
1696 // Simulate the navigation to the page, that's when the interstitial gets
1713 // Test navigating to a page that shows an interstitial without creating a new
1714 // navigation entry (this happens when the interstitial is triggered by a
1722 // Show an interstitial.
1726 GURL url2("http://interstitial");
1727 TestInterstitialPage* interstitial =
1729 TestInterstitialPageStateGuard state_guard(interstitial);
1730 interstitial->Show();
1731 // The interstitial should not show until its navigation has committed.
1732 EXPECT_FALSE(interstitial->is_showing());
1735 // Let's commit the interstitial navigation.
1736 interstitial->TestDidNavigate(1, url2);
1737 EXPECT_TRUE(interstitial->is_showing());
1739 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial);
1742 // The URL specified to the interstitial should have been ignored.
1746 interstitial->Proceed();
1762 // Test navigating to a page that shows an interstitial, then navigating away.
1764 // Show interstitial.
1768 GURL url("http://interstitial");
1769 TestInterstitialPage* interstitial =
1771 TestInterstitialPageStateGuard state_guard(interstitial);
1772 interstitial->Show();
1773 interstitial->TestDidNavigate(1, url);
1775 // While interstitial showing, navigate to a new URL.
1785 // Test navigating to a page that shows an interstitial, then going back.
1792 // Show interstitial.
1796 GURL interstitial_url("http://interstitial");
1797 TestInterstitialPage* interstitial =
1800 TestInterstitialPageStateGuard state_guard(interstitial);
1801 interstitial->Show();
1802 interstitial->TestDidNavigate(2, interstitial_url);
1804 // While the interstitial is showing, go back.
1808 // Make sure we are back to the original page and that the interstitial is
1819 // Test navigating to a page that shows an interstitial, has a renderer crash,
1827 // Show interstitial.
1831 GURL interstitial_url("http://interstitial");
1832 TestInterstitialPage* interstitial =
1835 TestInterstitialPageStateGuard state_guard(interstitial);
1836 interstitial->Show();
1837 interstitial->TestDidNavigate(2, interstitial_url);
1844 // While the interstitial is showing, go back.
1848 // Make sure we are back to the original page and that the interstitial is
1859 // Test navigating to a page that shows an interstitial, has the renderer crash,
1860 // and then navigates to the interstitial.
1867 // Show interstitial.
1871 GURL interstitial_url("http://interstitial");
1872 TestInterstitialPage* interstitial =
1875 TestInterstitialPageStateGuard state_guard(interstitial);
1876 interstitial->Show();
1883 interstitial->TestDidNavigate(2, interstitial_url);
1886 // Test navigating to a page that shows an interstitial, then close the
1889 // Show interstitial.
1893 GURL url("http://interstitial");
1894 TestInterstitialPage* interstitial =
1896 TestInterstitialPageStateGuard state_guard(interstitial);
1897 interstitial->Show();
1898 interstitial->TestDidNavigate(1, url);
1908 // Test navigating to a page that shows an interstitial, then close the
1911 // Show interstitial.
1915 GURL url("http://interstitial");
1916 TestInterstitialPage* interstitial =
1918 TestInterstitialPageStateGuard state_guard(interstitial);
1919 interstitial->Show();
1920 interstitial->TestDidNavigate(1, url);
1922 interstitial->GetRenderViewHostForTesting());
1928 // Before the interstitial has a chance to process its shutdown task,
1938 // Test that after Proceed is called and an interstitial is still shown, no more
1946 // Show an interstitial.
1950 GURL url2("http://interstitial");
1951 TestInterstitialPage* interstitial =
1953 TestInterstitialPageStateGuard state_guard(interstitial);
1954 interstitial->Show();
1955 interstitial->TestDidNavigate(1, url2);
1958 EXPECT_EQ(0, interstitial->command_received_count());
1959 interstitial->TestDomOperationResponse("toto");
1960 EXPECT_EQ(1, interstitial->command_received_count());
1963 interstitial->Proceed();
1969 interstitial->TestDomOperationResponse("hello");
1970 interstitial->TestDomOperationResponse("hi");
1971 EXPECT_EQ(1, interstitial->command_received_count());
1974 // Test showing an interstitial while another interstitial is already showing.
1981 // Show an interstitial.
1992 // Now show another interstitial.
2026 // Test showing an interstitial, proceeding and then navigating to another
2027 // interstitial.
2034 // Show an interstitial.
2045 // Take action. The interstitial won't be hidden until the navigation is
2050 // Now show another interstitial (simulating the navigation causing another
2051 // interstitial).
2083 // Test that navigating away from an interstitial while it's loading cause it
2086 // Show an interstitial.
2090 GURL interstitial_url("http://interstitial");
2091 TestInterstitialPage* interstitial =
2094 TestInterstitialPageStateGuard state_guard(interstitial);
2095 interstitial->Show();
2098 // interstitial finishes loading.
2102 EXPECT_FALSE(interstitial->is_showing());
2106 // Now let's make the interstitial navigation commit.
2107 interstitial->TestDidNavigate(1, interstitial_url);
2109 // After it loaded the interstitial should be gone.
2116 // Test that a new request to show an interstitial while an interstitial is
2119 GURL interstitial_url("http://interstitial");
2121 // Show a first interstitial.
2131 // Show another interstitial on that same contents before the first one had
2142 // The first interstitial should have been closed and deleted.
2151 // Make the interstitial navigation commit it should be showing.
2156 // Test showing an interstitial and have its renderer crash.
2158 // Show an interstitial.
2162 GURL url("http://interstitial");
2163 TestInterstitialPage* interstitial =
2165 TestInterstitialPageStateGuard state_guard(interstitial);
2166 interstitial->Show();
2167 // Simulate a renderer crash before the interstitial is shown.
2168 interstitial->TestRenderViewTerminated(
2170 // The interstitial should have been dismissed.
2176 interstitial =
2178 interstitial->Show();
2179 interstitial->TestDidNavigate(1, url);
2181 interstitial->TestRenderViewTerminated(
2183 // The interstitial should have been dismissed.
2189 // Tests that showing an interstitial as a result of a browser initiated
2190 // navigation while an interstitial is showing does not remove the pending
2200 // Simulate that navigation triggering an interstitial.
2204 TestInterstitialPage* interstitial =
2206 TestInterstitialPageStateGuard state_guard(interstitial);
2207 interstitial->Show();
2208 interstitial->TestDidNavigate(1, kGURL);
2211 // interstitial.
2228 // And that the first interstitial is gone, but not the second.
2236 // Tests that Javascript messages are not shown while an interstitial is
2249 // Simulate showing an interstitial while the page is showing.
2253 TestInterstitialPage* interstitial =
2255 TestInterstitialPageStateGuard state_guard(interstitial);
2256 interstitial->Show();
2257 interstitial->TestDidNavigate(1, kGURL);
2259 // While the interstitial is showing, let's simulate the hidden page
2270 // interstitial it isn't copied over to the destination.
2277 // Initiate a browser navigation that will trigger the interstitial
2281 // Show an interstitial.
2285 GURL url2("http://interstitial");
2286 TestInterstitialPage* interstitial =
2288 TestInterstitialPageStateGuard state_guard(interstitial);
2289 interstitial->Show();
2290 interstitial->TestDidNavigate(1, url2);
2291 EXPECT_TRUE(interstitial->is_showing());
2312 // And the merged controller shouldn't be showing an interstitial.
2317 // showing an interstitial.
2332 // Show an interstitial.
2336 GURL url3("http://interstitial");
2337 TestInterstitialPage* interstitial =
2340 TestInterstitialPageStateGuard state_guard(interstitial);
2341 interstitial->Show();
2342 interstitial->TestDidNavigate(1, url3);
2343 EXPECT_TRUE(interstitial->is_showing());
2347 // interstitial is showing in the target.