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

Unified Diff: chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc

Issue 2901583002: Fold AppModalDialog into its only subclass, JavaScriptAppModalDialog. (Closed)
Patch Set: fix collapse Created 3 years, 7 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
Index: chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
diff --git a/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc b/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
index ea1741267b184c1fca0ec1af3fac36b533dda2ce..2a9fd4f2ea3fa16d7f6d4f4eb3a2d7e1b1450a7e 100644
--- a/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
+++ b/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
@@ -708,19 +708,16 @@ IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest,
tab->GetMainFrame()->ExecuteJavaScriptForTests(
base::UTF8ToUTF16("var o = document.createElement('object'); o.data = "
"'/alert_dialog.pdf'; document.body.appendChild(o);"));
- app_modal::AppModalDialog* dialog = ui_test_utils::WaitForAppModalDialog();
+ app_modal::JavaScriptAppModalDialog* dialog =
+ ui_test_utils::WaitForAppModalDialog();
#if !defined(OS_MACOSX)
if (chrome::FindLastActive() != browser())
alert_waiter.WaitForActivation();
#endif
// Verify that after the dialog was closed, the popup is in front again.
- ASSERT_TRUE(dialog->IsJavaScriptModalDialog());
- app_modal::JavaScriptAppModalDialog* js_dialog =
- static_cast<app_modal::JavaScriptAppModalDialog*>(dialog);
-
ui_test_utils::BrowserActivationWaiter waiter(popup_browser);
- js_dialog->native_dialog()->AcceptAppModalDialog();
+ dialog->native_dialog()->AcceptAppModalDialog();
waiter.WaitForActivation();
ASSERT_EQ(popup_browser, chrome::FindLastActive());
}
« no previous file with comments | « chrome/browser/ui/android/javascript_app_modal_dialog_android.cc ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698