Fix flakey test by making sure WebUI dialog is shut down before test completion.

BUG=89931
TEST=Run the test on a loaded single-CPU system before and after the change.
Before, notice the dialog staying up past when the main windows goes away,
won't get through more than 1 or 2 repeats before breaking.
After, dialog goes away first, no more flakey.


Review URL: http://codereview.chromium.org/7747036

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98576 0039d316-1c4b-4281-b951-d872f2087c98
parent a0233591
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment