Home | History | Annotate | Download | only in tab_contents

Lines Matching refs:interstitial

66         TestInterstitialPage* interstitial) = 0;
73 // |deleted| (like all interstitial related tests do at this point), make sure
78 // interstitial, as in such a case it will be destroyed in the test TearDown
180 virtual void TestInterstitialPageDeleted(TestInterstitialPage* interstitial) {
181 DCHECK(interstitial_page_ == interstitial);
874 // Interstitial Tests
878 // as when a URL is typed in the location bar) that shows an interstitial and
887 // Initiate a browser navigation that will trigger the interstitial
891 // Show an interstitial.
895 GURL url2("http://interstitial");
896 TestInterstitialPage* interstitial =
898 TestInterstitialPageStateGuard state_guard(interstitial);
899 interstitial->Show();
900 // The interstitial should not show until its navigation has committed.
901 EXPECT_FALSE(interstitial->is_showing());
904 // Let's commit the interstitial navigation.
905 interstitial->TestDidNavigate(1, url2);
906 EXPECT_TRUE(interstitial->is_showing());
908 EXPECT_TRUE(contents()->interstitial_page() == interstitial);
914 interstitial->DontProceed();
926 // as when clicking on a link in the page) that shows an interstitial and
935 // Show an interstitial (no pending entry, the interstitial would have been
940 GURL url2("http://interstitial");
941 TestInterstitialPage* interstitial =
943 TestInterstitialPageStateGuard state_guard(interstitial);
944 interstitial->Show();
945 // The interstitial should not show until its navigation has committed.
946 EXPECT_FALSE(interstitial->is_showing());
949 // Let's commit the interstitial navigation.
950 interstitial->TestDidNavigate(1, url2);
951 EXPECT_TRUE(interstitial->is_showing());
953 EXPECT_TRUE(contents()->interstitial_page() == interstitial);
959 interstitial->DontProceed();
970 // Test navigating to a page that shows an interstitial without creating a new
971 // navigation entry (this happens when the interstitial is triggered by a
979 // Show an interstitial.
983 GURL url2("http://interstitial");
984 TestInterstitialPage* interstitial =
986 TestInterstitialPageStateGuard state_guard(interstitial);
987 interstitial->Show();
988 // The interstitial should not show until its navigation has committed.
989 EXPECT_FALSE(interstitial->is_showing());
992 // Let's commit the interstitial navigation.
993 interstitial->TestDidNavigate(1, url2);
994 EXPECT_TRUE(interstitial->is_showing());
996 EXPECT_TRUE(contents()->interstitial_page() == interstitial);
999 // The URL specified to the interstitial should have been ignored.
1003 interstitial->DontProceed();
1015 // as when a URL is typed in the location bar) that shows an interstitial and
1024 // Initiate a browser navigation that will trigger the interstitial
1028 // Show an interstitial.
1032 GURL url2("http://interstitial");
1033 TestInterstitialPage* interstitial =
1035 TestInterstitialPageStateGuard state_guard(interstitial);
1036 interstitial->Show();
1037 // The interstitial should not show until its navigation has committed.
1038 EXPECT_FALSE(interstitial->is_showing());
1041 // Let's commit the interstitial navigation.
1042 interstitial->TestDidNavigate(1, url2);
1043 EXPECT_TRUE(interstitial->is_showing());
1045 EXPECT_TRUE(contents()->interstitial_page() == interstitial);
1051 interstitial->Proceed();
1052 // The interstitial should show until the new navigation commits.
1056 EXPECT_TRUE(contents()->interstitial_page() == interstitial);
1058 // Simulate the navigation to the page, that's when the interstitial gets
1074 // as when clicking on a link in the page) that shows an interstitial and
1083 // Show an interstitial.
1087 GURL url2("http://interstitial");
1088 TestInterstitialPage* interstitial =
1090 TestInterstitialPageStateGuard state_guard(interstitial);
1091 interstitial->Show();
1092 // The interstitial should not show until its navigation has committed.
1093 EXPECT_FALSE(interstitial->is_showing());
1096 // Let's commit the interstitial navigation.
1097 interstitial->TestDidNavigate(1, url2);
1098 EXPECT_TRUE(interstitial->is_showing());
1100 EXPECT_TRUE(contents()->interstitial_page() == interstitial);
1106 interstitial->Proceed();
1107 // The interstitial should show until the new navigation commits.
1111 EXPECT_TRUE(contents()->interstitial_page() == interstitial);
1113 // Simulate the navigation to the page, that's when the interstitial gets
1128 // Test navigating to a page that shows an interstitial without creating a new
1129 // navigation entry (this happens when the interstitial is triggered by a
1137 // Show an interstitial.
1141 GURL url2("http://interstitial");
1142 TestInterstitialPage* interstitial =
1144 TestInterstitialPageStateGuard state_guard(interstitial);
1145 interstitial->Show();
1146 // The interstitial should not show until its navigation has committed.
1147 EXPECT_FALSE(interstitial->is_showing());
1150 // Let's commit the interstitial navigation.
1151 interstitial->TestDidNavigate(1, url2);
1152 EXPECT_TRUE(interstitial->is_showing());
1154 EXPECT_TRUE(contents()->interstitial_page() == interstitial);
1157 // The URL specified to the interstitial should have been ignored.
1161 interstitial->Proceed();
1175 // Test navigating to a page that shows an interstitial, then navigating away.
1177 // Show interstitial.
1181 GURL url("http://interstitial");
1182 TestInterstitialPage* interstitial =
1184 TestInterstitialPageStateGuard state_guard(interstitial);
1185 interstitial->Show();
1186 interstitial->TestDidNavigate(1, url);
1188 // While interstitial showing, navigate to a new URL.
1196 // Test navigating to a page that shows an interstitial, then going back.
1203 // Show interstitial.
1207 GURL interstitial_url("http://interstitial");
1208 TestInterstitialPage* interstitial =
1211 TestInterstitialPageStateGuard state_guard(interstitial);
1212 interstitial->Show();
1213 interstitial->TestDidNavigate(2, interstitial_url);
1215 // While the interstitial is showing, go back.
1219 // Make sure we are back to the original page and that the interstitial is
1228 // Test navigating to a page that shows an interstitial, has a renderer crash,
1236 // Show interstitial.
1240 GURL interstitial_url("http://interstitial");
1241 TestInterstitialPage* interstitial =
1244 TestInterstitialPageStateGuard state_guard(interstitial);
1245 interstitial->Show();
1246 interstitial->TestDidNavigate(2, interstitial_url);
1253 // While the interstitial is showing, go back.
1257 // Make sure we are back to the original page and that the interstitial is
1266 // Test navigating to a page that shows an interstitial, has the renderer crash,
1267 // and then navigates to the interstitial.
1274 // Show interstitial.
1278 GURL interstitial_url("http://interstitial");
1279 TestInterstitialPage* interstitial =
1282 TestInterstitialPageStateGuard state_guard(interstitial);
1283 interstitial->Show();
1290 interstitial->TestDidNavigate(2, interstitial_url);
1293 // Test navigating to a page that shows an interstitial, then close the tab.
1295 // Show interstitial.
1299 GURL url("http://interstitial");
1300 TestInterstitialPage* interstitial =
1302 TestInterstitialPageStateGuard state_guard(interstitial);
1303 interstitial->Show();
1304 interstitial->TestDidNavigate(1, url);
1312 // Test that after Proceed is called and an interstitial is still shown, no more
1320 // Show an interstitial.
1324 GURL url2("http://interstitial");
1325 TestInterstitialPage* interstitial =
1327 TestInterstitialPageStateGuard state_guard(interstitial);
1328 interstitial->Show();
1329 interstitial->TestDidNavigate(1, url2);
1332 EXPECT_EQ(0, interstitial->command_received_count());
1333 interstitial->TestDomOperationResponse("toto");
1334 EXPECT_EQ(1, interstitial->command_received_count());
1337 interstitial->Proceed();
1342 interstitial->TestDomOperationResponse("hello");
1343 interstitial->TestDomOperationResponse("hi");
1344 EXPECT_EQ(1, interstitial->command_received_count());
1347 // Test showing an interstitial while another interstitial is already showing.
1354 // Show an interstitial.
1365 // Now show another interstitial.
1396 // Test showing an interstitial, proceeding and then navigating to another
1397 // interstitial.
1404 // Show an interstitial.
1415 // Take action. The interstitial won't be hidden until the navigation is
1420 // Now show another interstitial (simulating the navigation causing another
1421 // interstitial).
1451 // Test that navigating away from an interstitial while it's loading cause it
1454 // Show an interstitial.
1458 GURL interstitial_url("http://interstitial");
1459 TestInterstitialPage* interstitial =
1462 TestInterstitialPageStateGuard state_guard(interstitial);
1463 interstitial->Show();
1466 // interstitial finishes loading.
1470 EXPECT_FALSE(interstitial->is_showing());
1472 // Now let's make the interstitial navigation commit.
1473 interstitial->TestDidNavigate(1, interstitial_url);
1475 // After it loaded the interstitial should be gone.
1480 // Test that a new request to show an interstitial while an interstitial is
1483 GURL interstitial_url("http://interstitial");
1485 // Show a first interstitial.
1495 // Show another interstitial on that same tab before the first one had time
1506 // The first interstitial should have been closed and deleted.
1514 // Make the interstitial navigation commit it should be showing.
1519 // Test showing an interstitial and have its renderer crash.
1521 // Show an interstitial.
1525 GURL url("http://interstitial");
1526 TestInterstitialPage* interstitial =
1528 TestInterstitialPageStateGuard state_guard(interstitial);
1529 interstitial->Show();
1530 // Simulate a renderer crash before the interstitial is shown.
1531 interstitial->TestRenderViewGone(
1533 // The interstitial should have been dismissed.
1538 interstitial =
1540 interstitial->Show();
1541 interstitial->TestDidNavigate(1, url);
1543 interstitial->TestRenderViewGone(
1545 // The interstitial should have been dismissed.
1550 // Tests that showing an interstitial as a result of a browser initiated
1551 // navigation while an interstitial is showing does not remove the pending
1560 // Simulate that navigation triggering an interstitial.
1564 TestInterstitialPage* interstitial =
1566 TestInterstitialPageStateGuard state_guard(interstitial);
1567 interstitial->Show();
1568 interstitial->TestDidNavigate(1, kGURL);
1571 // interstitial.
1587 // And that the first interstitial is gone, but not the second.
1594 // Tests that Javascript messages are not shown while an interstitial is
1607 // Simulate showing an interstitial while the page is showing.
1611 TestInterstitialPage* interstitial =
1613 TestInterstitialPageStateGuard state_guard(interstitial);
1614 interstitial->Show();
1615 interstitial->TestDidNavigate(1, kGURL);
1617 // While the interstitial is showing, let's simulate the hidden page
1628 // interstitial it isn't copied over to the destination.
1635 // Initiate a browser navigation that will trigger the interstitial
1639 // Show an interstitial.
1643 GURL url2("http://interstitial");
1644 TestInterstitialPage* interstitial =
1646 TestInterstitialPageStateGuard state_guard(interstitial);
1647 interstitial->Show();
1648 interstitial->TestDidNavigate(1, url2);
1649 EXPECT_TRUE(interstitial->is_showing());
1665 // And the merged controller shouldn't be showing an interstitial.
1670 // CopyStateFromAndPrune is invoked on is showing an interstitial.
1684 // Show an interstitial.
1688 GURL url3("http://interstitial");
1689 TestInterstitialPage* interstitial =
1692 TestInterstitialPageStateGuard state_guard(interstitial);
1693 interstitial->Show();
1694 interstitial->TestDidNavigate(1, url3);
1695 EXPECT_TRUE(interstitial->is_showing());
1709 // And the interstitial should be showing.
1712 // And the interstitial should do a reload on don't proceed.