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

Unified Diff: chrome/browser/ui/browser_browsertest.cc

Issue 50223002: Prevent modal dialogs when preparing to swap out. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 1 month 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 | « no previous file | content/browser/frame_host/render_view_host_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_browsertest.cc
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index 388571f700f9af1d847b461aa8c74826562f47ca..019d4694c8c1d3ce87ba30cfdddfd0a269c3579a 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -472,13 +472,13 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, CrossProcessNavCancelsDialogs) {
GURL url(test_server()->GetURL("empty.html"));
ui_test_utils::NavigateToURL(browser(), url);
- // TODO(creis): Test this with a setInterval loop of alert dialogs to ensure
- // that we can navigate away even if the renderer tries to synchronously
- // create more. See http://crbug.com/312490.
+ // Test this with multiple alert dialogs to ensure that we can navigate away
+ // even if the renderer tries to synchronously create more.
+ // See http://crbug.com/312490.
WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents();
contents->GetRenderViewHost()->ExecuteJavascriptInWebFrame(
string16(),
- ASCIIToUTF16("alert('Dialog showing!');"));
+ ASCIIToUTF16("alert('one'); alert('two');"));
AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog();
EXPECT_TRUE(alert->IsValid());
AppModalDialogQueue* dialog_queue = AppModalDialogQueue::GetInstance();
« no previous file with comments | « no previous file | content/browser/frame_host/render_view_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698