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

Unified Diff: chrome/browser/repost_form_warning_uitest.cc

Issue 8771017: chromeos: Fix closing issues with WebUI form-repost dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | chrome/browser/ui/webui/repost_form_warning_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/repost_form_warning_uitest.cc
diff --git a/chrome/browser/repost_form_warning_uitest.cc b/chrome/browser/repost_form_warning_uitest.cc
index 7a60459713c3f807bd67c9ab9a28499b7d85a902..8b18cde5015e109180e72a3ebe2727ef4949b9f9 100644
--- a/chrome/browser/repost_form_warning_uitest.cc
+++ b/chrome/browser/repost_form_warning_uitest.cc
@@ -48,8 +48,17 @@ TEST_F(RepostFormWarningTest, MAYBE_TestDoubleReload) {
tab->ReloadAsync();
tab->ReloadAsync();
+ // There should only be one dialog open.
+ int num_constrained_windows = 0;
+ ASSERT_TRUE(tab->GetConstrainedWindowCount(&num_constrained_windows));
Daniel Erat 2011/12/01 23:44:49 Do you happen to know if it's safe to check this i
Bernhard Bauer 2011/12/01 23:54:53 No, it should appear immediately. The async in the
+ EXPECT_EQ(1, num_constrained_windows);
+
// Navigate away from the page (this is when the test usually crashes).
ASSERT_TRUE(tab->NavigateToURL(test_server.GetURL("bar")));
+
+ // The dialog should've been closed.
+ ASSERT_TRUE(tab->GetConstrainedWindowCount(&num_constrained_windows));
+ EXPECT_EQ(0, num_constrained_windows);
}
#if defined(OS_WIN)
« no previous file with comments | « no previous file | chrome/browser/ui/webui/repost_form_warning_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698