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/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 EXPECT_TRUE(extension.get()); | 161 EXPECT_TRUE(extension.get()); |
162 EXPECT_EQ("", error); | 162 EXPECT_EQ("", error); |
163 return extension; | 163 return extension; |
164 } | 164 } |
165 | 165 |
166 } // namespace | 166 } // namespace |
167 | 167 |
168 class ThemeSyncableServiceTest : public testing::Test { | 168 class ThemeSyncableServiceTest : public testing::Test { |
169 protected: | 169 protected: |
170 ThemeSyncableServiceTest() | 170 ThemeSyncableServiceTest() |
171 : loop_(base::MessageLoop::TYPE_DEFAULT), | 171 : ui_thread_(content::BrowserThread::UI, &loop_), |
172 ui_thread_(content::BrowserThread::UI, &loop_), | |
173 file_thread_(content::BrowserThread::FILE, &loop_), | 172 file_thread_(content::BrowserThread::FILE, &loop_), |
174 fake_theme_service_(NULL) {} | 173 fake_theme_service_(NULL) {} |
175 | 174 |
176 virtual ~ThemeSyncableServiceTest() {} | 175 virtual ~ThemeSyncableServiceTest() {} |
177 | 176 |
178 virtual void SetUp() { | 177 virtual void SetUp() { |
179 profile_.reset(new TestingProfile); | 178 profile_.reset(new TestingProfile); |
180 fake_theme_service_ = BuildForProfile(profile_.get()); | 179 fake_theme_service_ = BuildForProfile(profile_.get()); |
181 theme_sync_service_.reset(new ThemeSyncableService(profile_.get(), | 180 theme_sync_service_.reset(new ThemeSyncableService(profile_.get(), |
182 fake_theme_service_)); | 181 fake_theme_service_)); |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 | 620 |
622 TEST_F(PolicyInstalledThemeTest, InstallThemeByPolicy) { | 621 TEST_F(PolicyInstalledThemeTest, InstallThemeByPolicy) { |
623 // Set up theme service to use custom theme that was installed by policy. | 622 // Set up theme service to use custom theme that was installed by policy. |
624 fake_theme_service_->SetTheme(theme_extension_.get()); | 623 fake_theme_service_->SetTheme(theme_extension_.get()); |
625 | 624 |
626 syncer::SyncDataList data_list = | 625 syncer::SyncDataList data_list = |
627 theme_sync_service_->GetAllSyncData(syncer::THEMES); | 626 theme_sync_service_->GetAllSyncData(syncer::THEMES); |
628 | 627 |
629 ASSERT_EQ(0u, data_list.size()); | 628 ASSERT_EQ(0u, data_list.size()); |
630 } | 629 } |
OLD | NEW |