diff options
author | allanwoj@chromium.org <allanwoj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-31 11:24:13 +0000 |
---|---|---|
committer | allanwoj@chromium.org <allanwoj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-31 11:24:13 +0000 |
commit | c919cf685fbadda56179e71ff0f389f3b0a03e0e (patch) | |
tree | 77bc79ec7970d82463e8f18f252fc8658b729c3a /chrome/browser | |
parent | 00759e5576a078b5ab8d0a367caabb477ed7d624 (diff) | |
download | chromium_src-c919cf685fbadda56179e71ff0f389f3b0a03e0e.zip chromium_src-c919cf685fbadda56179e71ff0f389f3b0a03e0e.tar.gz chromium_src-c919cf685fbadda56179e71ff0f389f3b0a03e0e.tar.bz2 |
Fixed hanging gatewaydataprovider test fixture
Changed the behaviour of the listener on an update to not wait for pending tasks to quit. Same for the WifiDataProvider. Also gave the fixture a better name.
BUG=53472
Review URL: http://codereview.chromium.org/3266002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57981 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/geolocation/gateway_data_provider_common_unittest.cc | 11 | ||||
-rw-r--r-- | chrome/browser/geolocation/wifi_data_provider_common_unittest.cc | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/chrome/browser/geolocation/gateway_data_provider_common_unittest.cc b/chrome/browser/geolocation/gateway_data_provider_common_unittest.cc index 3566230..7aede75a 100644 --- a/chrome/browser/geolocation/gateway_data_provider_common_unittest.cc +++ b/chrome/browser/geolocation/gateway_data_provider_common_unittest.cc @@ -50,7 +50,7 @@ class MessageLoopQuitListener // Provider should call back on client's thread. EXPECT_EQ(MessageLoop::current(), message_loop_to_quit_); provider_ = provider; - message_loop_to_quit_->Quit(); + message_loop_to_quit_->QuitNow(); } MessageLoop* message_loop_to_quit_; @@ -138,16 +138,15 @@ TEST_F(GeolocationGatewayDataProviderCommonTest, StartThread) { SUCCEED(); } -// Timed out at least once on Vista (dbg): http://crbug.com/53472 -TEST_F(GeolocationGatewayDataProviderCommonTest, DISABLED_IntermittentWifi){ +TEST_F(GeolocationGatewayDataProviderCommonTest, ConnectToDifferentRouter){ EXPECT_CALL(*polling_policy_, PollingInterval()) .Times(AtLeast(1)); EXPECT_CALL(*polling_policy_, NoRouterInterval()) .Times(1); EXPECT_CALL(*gateway_api_, GetRouterData(_)) - .WillOnce(Return(true)) - .WillOnce(Return(false)) - .WillRepeatedly(DoDefault()); + .WillOnce(Return(true)) // Connected to router. + .WillOnce(Return(false)) // Disconnected from router. + .WillRepeatedly(DoDefault()); // Connected to a different router. // Set MAC address for output. RouterData single_router; diff --git a/chrome/browser/geolocation/wifi_data_provider_common_unittest.cc b/chrome/browser/geolocation/wifi_data_provider_common_unittest.cc index 3cedeb5..b830040 100644 --- a/chrome/browser/geolocation/wifi_data_provider_common_unittest.cc +++ b/chrome/browser/geolocation/wifi_data_provider_common_unittest.cc @@ -70,7 +70,7 @@ class MessageLoopQuitListener // Provider should call back on client's thread. EXPECT_EQ(MessageLoop::current(), message_loop_to_quit_); provider_ = provider; - message_loop_to_quit_->Quit(); + message_loop_to_quit_->QuitNow(); } MessageLoop* message_loop_to_quit_; DeviceDataProvider<WifiData>* provider_; |