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

Unified Diff: chrome/browser/extensions/content_script_apitest.cc

Issue 1931793002: Stop using nested message loop for alert() and other JS dialogs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated comments and removed unused declaration Created 4 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 | « no previous file | chrome/browser/ui/browser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/content_script_apitest.cc
diff --git a/chrome/browser/extensions/content_script_apitest.cc b/chrome/browser/extensions/content_script_apitest.cc
index b13f94306b37cedbbb469634143639137cd32f71..c8d442885dff659576a6f2f6fc95385d298d0f84 100644
--- a/chrome/browser/extensions/content_script_apitest.cc
+++ b/chrome/browser/extensions/content_script_apitest.cc
@@ -482,7 +482,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptBlockingScript) {
run_loop.Run();
// Right now, the alert dialog is showing and blocking injection of anything
// after it, so the listener shouldn't be satisfied.
- EXPECT_TRUE(RunAllPending(web_contents));
EXPECT_FALSE(listener.was_satisfied());
EXPECT_EQ(1u, dialog_helper.dialog_count());
dialog_helper.CloseDialogs();
@@ -538,7 +537,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptBlockingScriptTabClosed) {
// Now, instead of closing the dialog, just close the tab. Later scripts
// should never get a chance to run (and we shouldn't crash).
run_loop.Run();
- EXPECT_TRUE(RunAllPending(web_contents));
EXPECT_FALSE(listener.was_satisfied());
EXPECT_TRUE(browser()->tab_strip_model()->CloseWebContentsAt(
browser()->tab_strip_model()->active_index(), 0));
@@ -576,7 +574,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
run_loop.Run();
// The extension will have injected at idle, but it should only inject once.
- EXPECT_TRUE(RunAllPending(web_contents));
EXPECT_EQ(1u, dialog_helper.dialog_count());
dialog_helper.CloseDialogs();
EXPECT_TRUE(RunAllPending(web_contents));
« no previous file with comments | « no previous file | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698