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/customization_document.h" | 5 #include "chrome/browser/chromeos/customization/customization_document.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 #include "chrome/browser/chromeos/net/network_portal_detector_test_impl.h" | 12 #include "chrome/browser/chromeos/net/network_portal_detector_test_impl.h" |
| 13 #include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" |
13 #include "chrome/browser/extensions/external_provider_impl.h" | 14 #include "chrome/browser/extensions/external_provider_impl.h" |
14 #include "chrome/browser/prefs/browser_prefs.h" | 15 #include "chrome/browser/prefs/browser_prefs.h" |
15 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" | 16 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" |
16 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" | 17 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" |
17 #include "chrome/test/base/testing_browser_process.h" | 18 #include "chrome/test/base/testing_browser_process.h" |
18 #include "chrome/test/base/testing_profile.h" | 19 #include "chrome/test/base/testing_profile.h" |
19 #include "chromeos/dbus/dbus_thread_manager.h" | 20 #include "chromeos/dbus/dbus_thread_manager.h" |
20 #include "chromeos/network/network_handler.h" | 21 #include "chromeos/network/network_handler.h" |
21 #include "chromeos/network/network_state.h" | 22 #include "chromeos/network/network_state.h" |
22 #include "chromeos/network/network_state_handler.h" | 23 #include "chromeos/network/network_state_handler.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 new user_prefs::PrefRegistrySyncable); | 287 new user_prefs::PrefRegistrySyncable); |
287 std::unique_ptr<sync_preferences::PrefServiceSyncable> prefs( | 288 std::unique_ptr<sync_preferences::PrefServiceSyncable> prefs( |
288 factory.CreateSyncable(registry.get())); | 289 factory.CreateSyncable(registry.get())); |
289 chrome::RegisterUserProfilePrefs(registry.get()); | 290 chrome::RegisterUserProfilePrefs(registry.get()); |
290 profile_builder.SetPrefService(std::move(prefs)); | 291 profile_builder.SetPrefService(std::move(prefs)); |
291 return profile_builder.Build(); | 292 return profile_builder.Build(); |
292 } | 293 } |
293 | 294 |
294 private: | 295 private: |
295 system::ScopedFakeStatisticsProvider fake_statistics_provider_; | 296 system::ScopedFakeStatisticsProvider fake_statistics_provider_; |
| 297 ScopedCrosSettingsTestHelper scoped_cros_settings_test_helper_; |
296 content::TestBrowserThreadBundle thread_bundle_; | 298 content::TestBrowserThreadBundle thread_bundle_; |
297 TestingPrefServiceSimple local_state_; | 299 TestingPrefServiceSimple local_state_; |
298 TestURLFetcherCallback url_callback_; | 300 TestURLFetcherCallback url_callback_; |
299 net::FakeURLFetcherFactory factory_; | 301 net::FakeURLFetcherFactory factory_; |
300 NetworkPortalDetectorTestImpl network_portal_detector_; | 302 NetworkPortalDetectorTestImpl network_portal_detector_; |
301 }; | 303 }; |
302 | 304 |
303 TEST_F(ServicesCustomizationDocumentTest, Basic) { | 305 TEST_F(ServicesCustomizationDocumentTest, Basic) { |
304 AddCustomizationIdToVp(kDummyCustomizationID); | 306 AddCustomizationIdToVp(kDummyCustomizationID); |
305 AddExpectedManifest(kDummyCustomizationID, kGoodServicesManifest); | 307 AddExpectedManifest(kDummyCustomizationID, kGoodServicesManifest); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _)).Times(0); | 459 EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _)).Times(0); |
458 EXPECT_CALL(visitor, OnExternalProviderReady(_)) | 460 EXPECT_CALL(visitor, OnExternalProviderReady(_)) |
459 .Times(1); | 461 .Times(1); |
460 EXPECT_CALL(visitor, OnExternalProviderUpdateComplete(_, _, _, _)).Times(0); | 462 EXPECT_CALL(visitor, OnExternalProviderUpdateComplete(_, _, _, _)).Times(0); |
461 | 463 |
462 RunUntilIdle(); | 464 RunUntilIdle(); |
463 EXPECT_TRUE(doc->IsReady()); | 465 EXPECT_TRUE(doc->IsReady()); |
464 } | 466 } |
465 | 467 |
466 } // namespace chromeos | 468 } // namespace chromeos |
OLD | NEW |