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

Unified Diff: chrome/browser/unload_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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/test/base/ui_test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/unload_browsertest.cc
diff --git a/chrome/browser/unload_browsertest.cc b/chrome/browser/unload_browsertest.cc
index 10517248137e4395c5b68bf1eacefab446260d39..6b50fa4c5ebb745291735cd17ce9e31b941e36d1 100644
--- a/chrome/browser/unload_browsertest.cc
+++ b/chrome/browser/unload_browsertest.cc
@@ -195,14 +195,12 @@ class UnloadTest : public InProcessBrowserTest {
// If |accept| is true, simulates user clicking OK, otherwise simulates
// clicking Cancel.
void ClickModalDialogButton(bool accept) {
- app_modal::AppModalDialog* dialog = ui_test_utils::WaitForAppModalDialog();
- ASSERT_TRUE(dialog->IsJavaScriptModalDialog());
- app_modal::JavaScriptAppModalDialog* js_dialog =
- static_cast<app_modal::JavaScriptAppModalDialog*>(dialog);
+ app_modal::JavaScriptAppModalDialog* dialog =
+ ui_test_utils::WaitForAppModalDialog();
if (accept)
- js_dialog->native_dialog()->AcceptAppModalDialog();
+ dialog->native_dialog()->AcceptAppModalDialog();
else
- js_dialog->native_dialog()->CancelAppModalDialog();
+ dialog->native_dialog()->CancelAppModalDialog();
}
void PrepareForDialog(Browser* browser) {
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/test/base/ui_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698