| 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" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 105 |
| 106 const char kDummyCustomizationID[] = "test-dummy"; | 106 const char kDummyCustomizationID[] = "test-dummy"; |
| 107 | 107 |
| 108 } // anonymous namespace | 108 } // anonymous namespace |
| 109 | 109 |
| 110 namespace chromeos { | 110 namespace chromeos { |
| 111 | 111 |
| 112 using ::testing::DoAll; | 112 using ::testing::DoAll; |
| 113 using ::testing::NotNull; | 113 using ::testing::NotNull; |
| 114 using ::testing::Return; | 114 using ::testing::Return; |
| 115 using ::testing::SetArgumentPointee; | 115 using ::testing::SetArgPointee; |
| 116 using ::testing::_; | 116 using ::testing::_; |
| 117 | 117 |
| 118 TEST(StartupCustomizationDocumentTest, Basic) { | 118 TEST(StartupCustomizationDocumentTest, Basic) { |
| 119 system::ScopedFakeStatisticsProvider fake_statistics_provider; | 119 system::ScopedFakeStatisticsProvider fake_statistics_provider; |
| 120 | 120 |
| 121 // hardware_class selects the appropriate entry in hwid_map in the manifest. | 121 // hardware_class selects the appropriate entry in hwid_map in the manifest. |
| 122 fake_statistics_provider.SetMachineStatistic("hardware_class", "Mario 12345"); | 122 fake_statistics_provider.SetMachineStatistic("hardware_class", "Mario 12345"); |
| 123 StartupCustomizationDocument customization(&fake_statistics_provider, | 123 StartupCustomizationDocument customization(&fake_statistics_provider, |
| 124 kGoodStartupManifest); | 124 kGoodStartupManifest); |
| 125 EXPECT_EQ("ru-RU", customization.initial_locale()); | 125 EXPECT_EQ("ru-RU", customization.initial_locale()); |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _)).Times(0); | 457 EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _)).Times(0); |
| 458 EXPECT_CALL(visitor, OnExternalProviderReady(_)) | 458 EXPECT_CALL(visitor, OnExternalProviderReady(_)) |
| 459 .Times(1); | 459 .Times(1); |
| 460 EXPECT_CALL(visitor, OnExternalProviderUpdateComplete(_, _, _, _)).Times(0); | 460 EXPECT_CALL(visitor, OnExternalProviderUpdateComplete(_, _, _, _)).Times(0); |
| 461 | 461 |
| 462 RunUntilIdle(); | 462 RunUntilIdle(); |
| 463 EXPECT_TRUE(doc->IsReady()); | 463 EXPECT_TRUE(doc->IsReady()); |
| 464 } | 464 } |
| 465 | 465 |
| 466 } // namespace chromeos | 466 } // namespace chromeos |
| OLD | NEW |