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

Unified Diff: chrome/browser/ui/views/constrained_window_views_browsertest.cc

Issue 2740783003: Revert "Revert of Reland: Switch WindowedNotificationObserver to use base::RunLoop. (patchset #3 id… (Closed)
Patch Set: Fix comment. Created 3 years, 8 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/views/constrained_window_views_browsertest.cc
diff --git a/chrome/browser/ui/views/constrained_window_views_browsertest.cc b/chrome/browser/ui/views/constrained_window_views_browsertest.cc
index 5db441f1a9143d94846528364e2cb8fe89a793ac..a78c73c2d421e1ba480c521a3f8d582a26a2b78f 100644
--- a/chrome/browser/ui/views/constrained_window_views_browsertest.cc
+++ b/chrome/browser/ui/views/constrained_window_views_browsertest.cc
@@ -211,6 +211,12 @@ IN_PROC_BROWSER_TEST_F(ConstrainedWindowViewTest, NavigationOnBackspace) {
content::RunAllPendingInMessageLoop();
content::WaitForLoadStop(web_contents);
+ // When Widget::Close is called, a task is posted that will destroy the
+ // widget. Here the widget is closed when the navigation commits. Load stop
+ // may occur right after the commit, before the widget is destroyed.
+ // Execute pending tasks to account for this.
+ base::RunLoop().RunUntilIdle();
+
EXPECT_EQ(nullptr, dialog->GetWidget());
EXPECT_EQ(original_url, web_contents->GetURL());
}
« no previous file with comments | « chrome/browser/ui/login/login_handler_test_utils.cc ('k') | chrome/browser/ui/views/find_bar_views_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698