OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/customization_document.h" | 5 #include "chrome/browser/chromeos/customization_document.h" |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/prefs/testing_pref_service.h" | 8 #include "base/prefs/testing_pref_service.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 EXPECT_CALL(mock_statistics_provider_, GetMachineStatistic(_, NotNull())) | 226 EXPECT_CALL(mock_statistics_provider_, GetMachineStatistic(_, NotNull())) |
227 .WillRepeatedly(Return(false)); | 227 .WillRepeatedly(Return(false)); |
228 chromeos::system::StatisticsProvider::SetTestProvider( | 228 chromeos::system::StatisticsProvider::SetTestProvider( |
229 &mock_statistics_provider_); | 229 &mock_statistics_provider_); |
230 | 230 |
231 DBusThreadManager::InitializeWithStub(); | 231 DBusThreadManager::InitializeWithStub(); |
232 NetworkHandler::Initialize(); | 232 NetworkHandler::Initialize(); |
233 | 233 |
234 NetworkPortalDetector::InitializeForTesting(&network_portal_detector_); | 234 NetworkPortalDetector::InitializeForTesting(&network_portal_detector_); |
235 NetworkPortalDetector::CaptivePortalState online_state; | 235 NetworkPortalDetector::CaptivePortalState online_state; |
236 online_state.status = NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE; | 236 online_state.status = captive_portal::CAPTIVE_PORTAL_STATUS_ONLINE; |
237 online_state.response_code = 204; | 237 online_state.response_code = 204; |
238 network_portal_detector_.SetDefaultNetworkPathForTesting( | 238 network_portal_detector_.SetDefaultNetworkPathForTesting( |
239 kStubEthernetServicePath); | 239 kStubEthernetServicePath); |
240 network_portal_detector_.SetDetectionResultsForTesting( | 240 network_portal_detector_.SetDetectionResultsForTesting( |
241 kStubEthernetServicePath, online_state); | 241 kStubEthernetServicePath, online_state); |
242 | 242 |
243 TestingBrowserProcess::GetGlobal()->SetLocalState(&local_state_); | 243 TestingBrowserProcess::GetGlobal()->SetLocalState(&local_state_); |
244 ServicesCustomizationDocument::RegisterPrefs(local_state_.registry()); | 244 ServicesCustomizationDocument::RegisterPrefs(local_state_.registry()); |
245 } | 245 } |
246 | 246 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _, _, _, _, _)) | 469 EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _, _, _, _, _)) |
470 .Times(0); | 470 .Times(0); |
471 EXPECT_CALL(visitor, OnExternalProviderReady(_)) | 471 EXPECT_CALL(visitor, OnExternalProviderReady(_)) |
472 .Times(1); | 472 .Times(1); |
473 | 473 |
474 RunUntilIdle(); | 474 RunUntilIdle(); |
475 EXPECT_TRUE(doc->IsReady()); | 475 EXPECT_TRUE(doc->IsReady()); |
476 } | 476 } |
477 | 477 |
478 } // namespace chromeos | 478 } // namespace chromeos |
OLD | NEW |