Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: components/web_modal/web_contents_modal_dialog_manager_unittest.cc

Issue 23981002: Provide configurable closing of web contents modal dialogs on interstitial webui (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/web_modal/web_contents_modal_dialog_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/web_modal/web_contents_modal_dialog_manager_unittest.cc
diff --git a/components/web_modal/web_contents_modal_dialog_manager_unittest.cc b/components/web_modal/web_contents_modal_dialog_manager_unittest.cc
index 21e9620f2a07ff5bf7713a7eb5c221235a4b23fa..ace315e9d4394949f0728df9e38a80976cb0df8f 100644
--- a/components/web_modal/web_contents_modal_dialog_manager_unittest.cc
+++ b/components/web_modal/web_contents_modal_dialog_manager_unittest.cc
@@ -232,6 +232,27 @@ TEST_F(WebContentsModalDialogManagerTest, VisibilityObservation) {
native_manager->GetDialogState(dialog1));
}
+TEST_F(WebContentsModalDialogManagerTest, InterstitialWebUI) {
sky 2013/09/05 16:19:19 Add description.
Mike Wittman 2013/09/05 20:22:19 Done.
+ const NativeWebContentsModalDialog dialog1 = MakeFakeDialog(1);
+ const NativeWebContentsModalDialog dialog2 = MakeFakeDialog(2);
+ const NativeWebContentsModalDialog dialog3 = MakeFakeDialog(3);
+
+ manager->ShowDialog(dialog1);
+ manager->ShowDialog(dialog2);
+ manager->ShowDialog(dialog3);
+
+ manager->SetCloseOnInterstitialWebUI(dialog1, true);
+ manager->SetCloseOnInterstitialWebUI(dialog3, true);
+
+ test_api->DidAttachInterstitialPage();
+ EXPECT_EQ(TestNativeWebContentsModalDialogManager::CLOSED,
+ native_manager->GetDialogState(dialog1));
+ EXPECT_EQ(TestNativeWebContentsModalDialogManager::SHOWN,
+ native_manager->GetDialogState(dialog2));
+ EXPECT_EQ(TestNativeWebContentsModalDialogManager::CLOSED,
+ native_manager->GetDialogState(dialog3));
+}
+
TEST_F(WebContentsModalDialogManagerTest, CloseDialogs) {
// The front dialog is always shown regardless of dialog close order.
const NativeWebContentsModalDialog dialog1 = MakeFakeDialog(1);
« no previous file with comments | « components/web_modal/web_contents_modal_dialog_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698