summaryrefslogtreecommitdiffstats
path: root/chrome/browser/geolocation
diff options
context:
space:
mode:
authorallanwoj@chromium.org <allanwoj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-31 10:15:46 +0000
committerallanwoj@chromium.org <allanwoj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-31 10:15:46 +0000
commit5bace8643f7f2359e7b76d85713218123cc536fd (patch)
treeb0dcdb059c140067ffe0b5b0444e0751b6845f34 /chrome/browser/geolocation
parent55df1e823d3e15e33ff15a329e95730de613d29e (diff)
downloadchromium_src-5bace8643f7f2359e7b76d85713218123cc536fd.zip
chromium_src-5bace8643f7f2359e7b76d85713218123cc536fd.tar.gz
chromium_src-5bace8643f7f2359e7b76d85713218123cc536fd.tar.bz2
Fix leaking tests for network location providers
The StartThread fixture now calls main_message_loop_.Run() to release a reference on the provider. Same problem should affect the wifi data provider so added there as well. Also removed the StopProvider call as it is done in the TearDown and change the NoRouterInterval to be 1 millisecond. BUG=53573 Review URL: http://codereview.chromium.org/3264001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57975 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/geolocation')
-rw-r--r--chrome/browser/geolocation/gateway_data_provider_common_unittest.cc4
-rw-r--r--chrome/browser/geolocation/wifi_data_provider_common_unittest.cc2
2 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/geolocation/gateway_data_provider_common_unittest.cc b/chrome/browser/geolocation/gateway_data_provider_common_unittest.cc
index 82867a5..3566230 100644
--- a/chrome/browser/geolocation/gateway_data_provider_common_unittest.cc
+++ b/chrome/browser/geolocation/gateway_data_provider_common_unittest.cc
@@ -63,7 +63,7 @@ class MockGatewayPollingPolicy : public PollingPolicyInterface {
ON_CALL(*this, PollingInterval())
.WillByDefault(Return(1));
ON_CALL(*this, NoRouterInterval())
- .WillByDefault(Return(2));
+ .WillByDefault(Return(1));
}
// PollingPolicyInterface
@@ -134,7 +134,7 @@ TEST_F(GeolocationGatewayDataProviderCommonTest, StartThread) {
EXPECT_CALL(*polling_policy_, PollingInterval())
.Times(AtLeast(1));
EXPECT_TRUE(provider_->StartDataProvider());
- provider_->StopDataProvider();
+ main_message_loop_.Run();
SUCCEED();
}
diff --git a/chrome/browser/geolocation/wifi_data_provider_common_unittest.cc b/chrome/browser/geolocation/wifi_data_provider_common_unittest.cc
index 2b8390e..3cedeb5 100644
--- a/chrome/browser/geolocation/wifi_data_provider_common_unittest.cc
+++ b/chrome/browser/geolocation/wifi_data_provider_common_unittest.cc
@@ -143,7 +143,7 @@ TEST_F(GeolocationWifiDataProviderCommonTest, StartThread) {
EXPECT_CALL(*polling_policy_, PollingInterval())
.Times(AtLeast(1));
EXPECT_TRUE(provider_->StartDataProvider());
- provider_->StopDataProvider();
+ main_message_loop_.Run();
SUCCEED();
}