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/themes/theme_syncable_service.h" | 5 #include "chrome/browser/themes/theme_syncable_service.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 const string& name, | 131 const string& name, |
132 const string& update_url) { | 132 const string& update_url) { |
133 DictionaryValue source; | 133 DictionaryValue source; |
134 source.SetString(extension_manifest_keys::kName, name); | 134 source.SetString(extension_manifest_keys::kName, name); |
135 source.Set(extension_manifest_keys::kTheme, new DictionaryValue()); | 135 source.Set(extension_manifest_keys::kTheme, new DictionaryValue()); |
136 source.SetString(extension_manifest_keys::kUpdateURL, update_url); | 136 source.SetString(extension_manifest_keys::kUpdateURL, update_url); |
137 source.SetString(extension_manifest_keys::kVersion, "0.0.0.0"); | 137 source.SetString(extension_manifest_keys::kVersion, "0.0.0.0"); |
138 string error; | 138 string error; |
139 scoped_refptr<extensions::Extension> extension = | 139 scoped_refptr<extensions::Extension> extension = |
140 extensions::Extension::Create( | 140 extensions::Extension::Create( |
141 extension_path, extensions::Extension::EXTERNAL_PREF_DOWNLOAD, source, | 141 extension_path, extensions::Manifest::EXTERNAL_PREF_DOWNLOAD, source, |
142 extensions::Extension::NO_FLAGS, &error); | 142 extensions::Extension::NO_FLAGS, &error); |
143 EXPECT_TRUE(extension); | 143 EXPECT_TRUE(extension); |
144 EXPECT_EQ("", error); | 144 EXPECT_EQ("", error); |
145 return extension; | 145 return extension; |
146 } | 146 } |
147 | 147 |
148 } // namespace | 148 } // namespace |
149 | 149 |
150 class ThemeSyncableServiceTest : public testing::Test { | 150 class ThemeSyncableServiceTest : public testing::Test { |
151 protected: | 151 protected: |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 // use_system_theme_by_default bit should be preserved. | 563 // use_system_theme_by_default bit should be preserved. |
564 fake_theme_service_->UseDefaultTheme(); | 564 fake_theme_service_->UseDefaultTheme(); |
565 theme_sync_service_->OnThemeChange(); | 565 theme_sync_service_->OnThemeChange(); |
566 EXPECT_EQ(1u, change_list.size()); | 566 EXPECT_EQ(1u, change_list.size()); |
567 const sync_pb::ThemeSpecifics& change_specifics = | 567 const sync_pb::ThemeSpecifics& change_specifics = |
568 change_list[0].sync_data().GetSpecifics().theme(); | 568 change_list[0].sync_data().GetSpecifics().theme(); |
569 EXPECT_FALSE(change_specifics.use_custom_theme()); | 569 EXPECT_FALSE(change_specifics.use_custom_theme()); |
570 EXPECT_TRUE(change_specifics.use_system_theme_by_default()); | 570 EXPECT_TRUE(change_specifics.use_system_theme_by_default()); |
571 } | 571 } |
572 #endif | 572 #endif |
OLD | NEW |