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

Side by Side Diff: chrome/browser/chromeos/login/wizard_controller_browsertest.cc

Issue 1220963005: Update base::StartsWith calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 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 (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 "chrome/browser/chromeos/login/wizard_controller.h" 5 #include "chrome/browser/chromeos/login/wizard_controller.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/json/json_file_value_serializer.h" 10 #include "base/json/json_file_value_serializer.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 } 376 }
377 377
378 class WizardControllerTestURLFetcherFactory 378 class WizardControllerTestURLFetcherFactory
379 : public net::TestURLFetcherFactory { 379 : public net::TestURLFetcherFactory {
380 public: 380 public:
381 scoped_ptr<net::URLFetcher> CreateURLFetcher( 381 scoped_ptr<net::URLFetcher> CreateURLFetcher(
382 int id, 382 int id,
383 const GURL& url, 383 const GURL& url,
384 net::URLFetcher::RequestType request_type, 384 net::URLFetcher::RequestType request_type,
385 net::URLFetcherDelegate* d) override { 385 net::URLFetcherDelegate* d) override {
386 if (base::StartsWithASCII( 386 if (base::StartsWith(
387 url.spec(), 387 url.spec(),
388 SimpleGeolocationProvider::DefaultGeolocationProviderURL().spec(), 388 SimpleGeolocationProvider::DefaultGeolocationProviderURL().spec(),
389 true)) { 389 base::CompareCase::SENSITIVE)) {
390 return scoped_ptr<net::URLFetcher>(new net::FakeURLFetcher( 390 return scoped_ptr<net::URLFetcher>(new net::FakeURLFetcher(
391 url, d, std::string(kGeolocationResponseBody), net::HTTP_OK, 391 url, d, std::string(kGeolocationResponseBody), net::HTTP_OK,
392 net::URLRequestStatus::SUCCESS)); 392 net::URLRequestStatus::SUCCESS));
393 } 393 }
394 if (base::StartsWithASCII( 394 if (base::StartsWith(url.spec(),
395 url.spec(), chromeos::DefaultTimezoneProviderURL().spec(), true)) { 395 chromeos::DefaultTimezoneProviderURL().spec(),
396 base::CompareCase::SENSITIVE)) {
396 return scoped_ptr<net::URLFetcher>(new net::FakeURLFetcher( 397 return scoped_ptr<net::URLFetcher>(new net::FakeURLFetcher(
397 url, d, std::string(kTimezoneResponseBody), net::HTTP_OK, 398 url, d, std::string(kTimezoneResponseBody), net::HTTP_OK,
398 net::URLRequestStatus::SUCCESS)); 399 net::URLRequestStatus::SUCCESS));
399 } 400 }
400 return net::TestURLFetcherFactory::CreateURLFetcher( 401 return net::TestURLFetcherFactory::CreateURLFetcher(
401 id, url, request_type, d); 402 id, url, request_type, d);
402 } 403 }
403 ~WizardControllerTestURLFetcherFactory() override {} 404 ~WizardControllerTestURLFetcherFactory() override {}
404 }; 405 };
405 406
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when 1261 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when
1261 // UI and logic is ready. http://crbug.com/127016 1262 // UI and logic is ready. http://crbug.com/127016
1262 1263
1263 // TODO(dzhioev): Add tests for controller/host pairing flow. 1264 // TODO(dzhioev): Add tests for controller/host pairing flow.
1264 // http://crbug.com/375191 1265 // http://crbug.com/375191
1265 1266
1266 static_assert(BaseScreenDelegate::EXIT_CODES_COUNT == 24, 1267 static_assert(BaseScreenDelegate::EXIT_CODES_COUNT == 24,
1267 "tests for new control flow are missing"); 1268 "tests for new control flow are missing");
1268 1269
1269 } // namespace chromeos 1270 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698