| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |