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

Unified Diff: chrome/browser/geolocation/geolocation_browsertest.cc

Issue 7489019: Fix up various browser tests not to use WaitForNavigation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 5 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/geolocation/geolocation_browsertest.cc
diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc
index 01cf36e5b95260d9e13676b8cc443c7958dc5819..af456023f75ff71c1c27f178f167a153fea926ef 100644
--- a/chrome/browser/geolocation/geolocation_browsertest.cc
+++ b/chrome/browser/geolocation/geolocation_browsertest.cc
@@ -317,11 +317,16 @@ class GeolocationBrowserTest : public InProcessBrowserTest {
size_t state_map_size = settings_state.state_map().size();
ASSERT_TRUE(infobar_);
LOG(WARNING) << "will set infobar response";
- if (allowed)
- infobar_->AsConfirmInfoBarDelegate()->Accept();
- else
- infobar_->AsConfirmInfoBarDelegate()->Cancel();
- WaitForNavigation();
+ {
+ ui_test_utils::WindowedNotificationObserver observer(
+ tab_contents_wrapper->controller());
+ if (allowed)
+ infobar_->AsConfirmInfoBarDelegate()->Accept();
+ else
+ infobar_->AsConfirmInfoBarDelegate()->Cancel();
+ observer.Wait();
+ }
+
tab_contents_wrapper->RemoveInfoBar(infobar_);
LOG(WARNING) << "infobar response set";
infobar_ = NULL;

Powered by Google App Engine
This is Rietveld 408576698