From 4e82187e29a6ce0310013d98f49286f0ad7d8e7c Mon Sep 17 00:00:00 2001 From: "joth@chromium.org" Date: Thu, 14 Oct 2010 11:39:50 +0000 Subject: Add extra logging to help in debugging flaky geolocation browser tests. Refactor mock location provider to send new position to provider thread, rather than writing it into shared memory that was missing locking. BUG=None TEST=Geoloc* browser and unit tests. Review URL: http://codereview.chromium.org/3749004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62535 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/geolocation/geolocation_browsertest.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'chrome/browser/geolocation/geolocation_browsertest.cc') diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc index 60b61cb..9efac98 100644 --- a/chrome/browser/geolocation/geolocation_browsertest.cc +++ b/chrome/browser/geolocation/geolocation_browsertest.cc @@ -173,8 +173,7 @@ class GeolocationNotificationObserver : public NotificationObserver { void NotifyGeoposition(const Geoposition& geoposition) { DCHECK(MockLocationProvider::instance_); - MockLocationProvider::instance_->position_ = geoposition; - MockLocationProvider::instance_->HandlePositionChanged(); + MockLocationProvider::instance_->HandlePositionChanged(geoposition); LOG(WARNING) << "MockLocationProvider listeners updated"; } @@ -332,6 +331,11 @@ class GeolocationBrowserTest : public InProcessBrowserTest { expected, function, current_browser_->GetSelectedTabContents()); } + // InProcessBrowserTest + virtual void TearDownInProcessBrowserTestFixture() { + LOG(WARNING) << "TearDownInProcessBrowserTestFixture. Test Finished."; + } + InfoBarDelegate* infobar_; Browser* current_browser_; // path element of a URL referencing the html content for this test. @@ -466,7 +470,9 @@ IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest, IFramesWithFreshPosition) { iframe_xpath_ = L"//iframe[@id='iframe_1']"; // Infobar was displayed, allow access and check there's no error code. SetInfobarResponse(iframe1_url_, true); + LOG(WARNING) << "Checking position..."; CheckGeoposition(fresh_position); + LOG(WARNING) << "...done."; } -- cgit v1.1