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

Side by Side Diff: chromeos/geolocation/simple_geolocation_unittest.cc

Issue 2157963002: Improve grammar in some comments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: maxiumum Created 4 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 "latitude=200.000000, longitude=200.000000, accuracy=-1.000000, " 275 "latitude=200.000000, longitude=200.000000, accuracy=-1.000000, "
276 "error_code=0, error_message='SimpleGeolocation provider at " 276 "error_code=0, error_message='SimpleGeolocation provider at "
277 "'https://localhost/' : JSONReader failed: Line: 1, column: 1, " 277 "'https://localhost/' : JSONReader failed: Line: 1, column: 1, "
278 "Unexpected token..', status=4 (TIMEOUT)", 278 "Unexpected token..', status=4 (TIMEOUT)",
279 receiver.position().ToString()); 279 receiver.position().ToString());
280 EXPECT_TRUE(receiver.server_error()); 280 EXPECT_TRUE(receiver.server_error());
281 EXPECT_GE(url_factory.attempts(), 2U); 281 EXPECT_GE(url_factory.attempts(), 2U);
282 if (url_factory.attempts() > expected_retries + 1) { 282 if (url_factory.attempts() > expected_retries + 1) {
283 LOG(WARNING) 283 LOG(WARNING)
284 << "SimpleGeolocationTest::InvalidResponse: Too many attempts (" 284 << "SimpleGeolocationTest::InvalidResponse: Too many attempts ("
285 << url_factory.attempts() << "), no more then " << expected_retries + 1 285 << url_factory.attempts() << "), no more than " << expected_retries + 1
286 << " expected."; 286 << " expected.";
287 } 287 }
288 if (url_factory.attempts() < expected_retries - 1) { 288 if (url_factory.attempts() < expected_retries - 1) {
289 LOG(WARNING) 289 LOG(WARNING)
290 << "SimpleGeolocationTest::InvalidResponse: Too little attempts (" 290 << "SimpleGeolocationTest::InvalidResponse: Too little attempts ("
291 << url_factory.attempts() << "), greater then " << expected_retries - 1 291 << url_factory.attempts() << "), greater than " << expected_retries - 1
292 << " expected."; 292 << " expected.";
293 } 293 }
294 } 294 }
295 295
296 TEST_F(SimpleGeolocationTest, NoWiFi) { 296 TEST_F(SimpleGeolocationTest, NoWiFi) {
297 // This initializes DBusThreadManager and markes it "for tests only". 297 // This initializes DBusThreadManager and markes it "for tests only".
298 DBusThreadManager::GetSetterForTesting(); 298 DBusThreadManager::GetSetterForTesting();
299 NetworkHandler::Initialize(); 299 NetworkHandler::Initialize();
300 300
301 WiFiTestMonitor requests_monitor; 301 WiFiTestMonitor requests_monitor;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 } 438 }
439 NetworkHandler::Shutdown(); 439 NetworkHandler::Shutdown();
440 } 440 }
441 441
442 // This test verifies that WiFi data is sent only if sending was requested. 442 // This test verifies that WiFi data is sent only if sending was requested.
443 INSTANTIATE_TEST_CASE_P(EnableDisableSendingWifiData, 443 INSTANTIATE_TEST_CASE_P(EnableDisableSendingWifiData,
444 SimpleGeolocationWiFiTest, 444 SimpleGeolocationWiFiTest,
445 testing::Bool()); 445 testing::Bool());
446 446
447 } // namespace chromeos 447 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/connector_settings.cc ('k') | chromeos/timezone/timezone_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698