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

Side by Side Diff: content/browser/geolocation/wifi_data_provider_common_unittest.cc

Issue 493773002: Disable two geolocation wifi tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <vector> 5 #include <vector>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" 10 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 single_access_point.radio_signal_strength = 4; 175 single_access_point.radio_signal_strength = 4;
176 single_access_point.signal_to_noise = 5; 176 single_access_point.signal_to_noise = 5;
177 single_access_point.ssid = base::ASCIIToUTF16("foossid"); 177 single_access_point.ssid = base::ASCIIToUTF16("foossid");
178 wlan_api_->data_out_.insert(single_access_point); 178 wlan_api_->data_out_.insert(single_access_point);
179 179
180 provider_->StartDataProvider(); 180 provider_->StartDataProvider();
181 main_message_loop_.Run(); 181 main_message_loop_.Run();
182 main_message_loop_.Run(); 182 main_message_loop_.Run();
183 } 183 }
184 184
185 TEST_F(GeolocationWifiDataProviderCommonTest, DoAnEmptyScan) { 185 #if defined(OS_MACOSX)
186 #define MAYBE_DoAnEmptyScan DISABLED_DoAnEmptyScan
187 #else
188 #define MAYBE_DoAnEmptyScan DoAnEmptyScan
189 #endif
190 TEST_F(GeolocationWifiDataProviderCommonTest, MAYBE_DoAnEmptyScan) {
186 EXPECT_CALL(*wlan_api_, GetAccessPointData(_)) 191 EXPECT_CALL(*wlan_api_, GetAccessPointData(_))
187 .Times(AtLeast(1)); 192 .Times(AtLeast(1));
188 EXPECT_CALL(*polling_policy_, PollingInterval()) 193 EXPECT_CALL(*polling_policy_, PollingInterval())
189 .Times(AtLeast(1)); 194 .Times(AtLeast(1));
190 provider_->StartDataProvider(); 195 provider_->StartDataProvider();
191 main_message_loop_.Run(); 196 main_message_loop_.Run();
192 EXPECT_EQ(wlan_api_->calls_, 1); 197 EXPECT_EQ(wlan_api_->calls_, 1);
193 WifiData data; 198 WifiData data;
194 EXPECT_TRUE(provider_->GetData(&data)); 199 EXPECT_TRUE(provider_->GetData(&data));
195 EXPECT_EQ(0, static_cast<int>(data.access_point_data.size())); 200 EXPECT_EQ(0, static_cast<int>(data.access_point_data.size()));
196 } 201 }
197 202
198 TEST_F(GeolocationWifiDataProviderCommonTest, DoScanWithResults) { 203 #if defined(OS_MACOSX)
204 #define MAYBE_DoScanWithResults DISABLED_DoScanWithResults
205 #else
206 #define MAYBE_DoScanWithResults DoScanWithResults
207 #endif
208 TEST_F(GeolocationWifiDataProviderCommonTest, MAYBE_DoScanWithResults) {
199 EXPECT_CALL(*wlan_api_, GetAccessPointData(_)) 209 EXPECT_CALL(*wlan_api_, GetAccessPointData(_))
200 .Times(AtLeast(1)); 210 .Times(AtLeast(1));
201 EXPECT_CALL(*polling_policy_, PollingInterval()) 211 EXPECT_CALL(*polling_policy_, PollingInterval())
202 .Times(AtLeast(1)); 212 .Times(AtLeast(1));
203 AccessPointData single_access_point; 213 AccessPointData single_access_point;
204 single_access_point.channel = 2; 214 single_access_point.channel = 2;
205 single_access_point.mac_address = 3; 215 single_access_point.mac_address = 3;
206 single_access_point.radio_signal_strength = 4; 216 single_access_point.radio_signal_strength = 4;
207 single_access_point.signal_to_noise = 5; 217 single_access_point.signal_to_noise = 5;
208 single_access_point.ssid = base::ASCIIToUTF16("foossid"); 218 single_access_point.ssid = base::ASCIIToUTF16("foossid");
(...skipping 11 matching lines...) Expand all
220 TEST_F(GeolocationWifiDataProviderCommonTest, RegisterUnregister) { 230 TEST_F(GeolocationWifiDataProviderCommonTest, RegisterUnregister) {
221 MessageLoopQuitter loop_quitter(&main_message_loop_); 231 MessageLoopQuitter loop_quitter(&main_message_loop_);
222 WifiDataProviderManager::SetFactory(CreateWifiDataProviderCommonWithMock); 232 WifiDataProviderManager::SetFactory(CreateWifiDataProviderCommonWithMock);
223 WifiDataProviderManager::Register(&loop_quitter.callback_); 233 WifiDataProviderManager::Register(&loop_quitter.callback_);
224 main_message_loop_.Run(); 234 main_message_loop_.Run();
225 WifiDataProviderManager::Unregister(&loop_quitter.callback_); 235 WifiDataProviderManager::Unregister(&loop_quitter.callback_);
226 WifiDataProviderManager::ResetFactory(); 236 WifiDataProviderManager::ResetFactory();
227 } 237 }
228 238
229 } // namespace content 239 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698