summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 22:45:53 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 22:45:53 +0000
commit2880fe18d26357c6b40d6ab2db1ba369043f9c33 (patch)
treefac6c51e3cd338405cb5c448df920f2c8622a523
parent4313847a9ec69c2054909ff3059cdc2d9238b679 (diff)
downloadchromium_src-2880fe18d26357c6b40d6ab2db1ba369043f9c33.zip
chromium_src-2880fe18d26357c6b40d6ab2db1ba369043f9c33.tar.gz
chromium_src-2880fe18d26357c6b40d6ab2db1ba369043f9c33.tar.bz2
Fix a problem with Geolocation tests trying to start the test server twice.
Will it fix some flakiness problems? Who knows. But at least NoInfobarForDeniedOrigin should stop failing on XP (it's calling Initialize twice). TBR=bulach, joth BUG=49680, 52518 Review URL: http://codereview.chromium.org/3127018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56439 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/geolocation/geolocation_browsertest.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc
index f273f7e..f1e648e 100644
--- a/chrome/browser/geolocation/geolocation_browsertest.cc
+++ b/chrome/browser/geolocation/geolocation_browsertest.cc
@@ -191,7 +191,8 @@ class GeolocationBrowserTest : public InProcessBrowserTest {
GeolocationBrowserTest()
: infobar_(NULL),
current_browser_(NULL),
- html_for_tests_("files/geolocation/simple.html") {
+ html_for_tests_("files/geolocation/simple.html"),
+ started_test_server_(false) {
EnableDOMAutomation();
}
@@ -205,9 +206,11 @@ class GeolocationBrowserTest : public InProcessBrowserTest {
bool Initialize(InitializationOptions options) WARN_UNUSED_RESULT {
GeolocationArbitrator::SetProviderFactoryForTest(
&NewAutoSuccessMockNetworkLocationProvider);
- bool started = test_server()->Start();
- EXPECT_TRUE(started);
- if (!started)
+
+ if (!started_test_server_)
+ started_test_server_ = test_server()->Start();
+ EXPECT_TRUE(started_test_server_);
+ if (!started_test_server_)
return false;
current_url_ = test_server()->GetURL(html_for_tests_);
@@ -341,6 +344,9 @@ class GeolocationBrowserTest : public InProcessBrowserTest {
GURL iframe0_url_;
// If not empty, the GURL for the second iframe.
GURL iframe1_url_;
+
+ // TODO(phajdan.jr): Remove after we can ask TestServer whether it is started.
+ bool started_test_server_;
};
IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest, DisplaysPermissionBar) {