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

Unified Diff: chrome/browser/printing/print_dialog_cloud_uitest.cc

Issue 7747036: Fix flakey test by making sure WebUI dialog is shut down before test completion. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use WindowedNotificationObserver Created 9 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_dialog_cloud_uitest.cc
diff --git a/chrome/browser/printing/print_dialog_cloud_uitest.cc b/chrome/browser/printing/print_dialog_cloud_uitest.cc
index a1285e530f6115da051374212d3020dfb50f26af..2354dc41fe51f088dc42b0fab9bac6435f95d52a 100644
--- a/chrome/browser/printing/print_dialog_cloud_uitest.cc
+++ b/chrome/browser/printing/print_dialog_cloud_uitest.cc
@@ -236,6 +236,13 @@ IN_PROC_BROWSER_TEST_F(PrintDialogCloudTest, HandlersRegistered) {
ui_test_utils::RunMessageLoop();
ASSERT_TRUE(TestController::GetInstance()->result());
+
+ // Close the dialog before finishing the test.
+ ui_test_utils::WindowedNotificationObserver signal(
+ content::NOTIFICATION_TAB_CLOSED, NotificationService::AllSources());
+ EXPECT_TRUE(ui_test_utils::SendKeyPressSync(browser(), ui::VKEY_ESCAPE,
+ false, false, false, false));
+ signal.Wait();
}
#if defined(OS_CHROMEOS)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698