Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: chrome/browser/themes/theme_syncable_service_unittest.cc

Issue 684613002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 } // namespace 139 } // namespace
140 140
141 class ThemeSyncableServiceTest : public testing::Test { 141 class ThemeSyncableServiceTest : public testing::Test {
142 protected: 142 protected:
143 ThemeSyncableServiceTest() 143 ThemeSyncableServiceTest()
144 : ui_thread_(content::BrowserThread::UI, &loop_), 144 : ui_thread_(content::BrowserThread::UI, &loop_),
145 file_thread_(content::BrowserThread::FILE, &loop_), 145 file_thread_(content::BrowserThread::FILE, &loop_),
146 fake_theme_service_(NULL) {} 146 fake_theme_service_(NULL) {}
147 147
148 virtual ~ThemeSyncableServiceTest() {} 148 ~ThemeSyncableServiceTest() override {}
149 149
150 virtual void SetUp() { 150 void SetUp() override {
151 profile_.reset(new TestingProfile); 151 profile_.reset(new TestingProfile);
152 fake_theme_service_ = BuildForProfile(profile_.get()); 152 fake_theme_service_ = BuildForProfile(profile_.get());
153 theme_sync_service_.reset(new ThemeSyncableService(profile_.get(), 153 theme_sync_service_.reset(new ThemeSyncableService(profile_.get(),
154 fake_theme_service_)); 154 fake_theme_service_));
155 fake_change_processor_.reset(new syncer::FakeSyncChangeProcessor); 155 fake_change_processor_.reset(new syncer::FakeSyncChangeProcessor);
156 SetUpExtension(); 156 SetUpExtension();
157 } 157 }
158 158
159 virtual void TearDown() { 159 void TearDown() override {
160 profile_.reset(); 160 profile_.reset();
161 loop_.RunUntilIdle(); 161 loop_.RunUntilIdle();
162 } 162 }
163 163
164 void SetUpExtension() { 164 void SetUpExtension() {
165 CommandLine command_line(CommandLine::NO_PROGRAM); 165 CommandLine command_line(CommandLine::NO_PROGRAM);
166 extensions::TestExtensionSystem* test_ext_system = 166 extensions::TestExtensionSystem* test_ext_system =
167 static_cast<extensions::TestExtensionSystem*>( 167 static_cast<extensions::TestExtensionSystem*>(
168 extensions::ExtensionSystem::Get(profile_.get())); 168 extensions::ExtensionSystem::Get(profile_.get()));
169 ExtensionService* service = test_ext_system->CreateExtensionService( 169 ExtensionService* service = test_ext_system->CreateExtensionService(
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 649
650 TEST_F(PolicyInstalledThemeTest, InstallThemeByPolicy) { 650 TEST_F(PolicyInstalledThemeTest, InstallThemeByPolicy) {
651 // Set up theme service to use custom theme that was installed by policy. 651 // Set up theme service to use custom theme that was installed by policy.
652 fake_theme_service_->SetTheme(theme_extension_.get()); 652 fake_theme_service_->SetTheme(theme_extension_.get());
653 653
654 syncer::SyncDataList data_list = 654 syncer::SyncDataList data_list =
655 theme_sync_service_->GetAllSyncData(syncer::THEMES); 655 theme_sync_service_->GetAllSyncData(syncer::THEMES);
656 656
657 ASSERT_EQ(0u, data_list.size()); 657 ASSERT_EQ(0u, data_list.size());
658 } 658 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698