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

Side by Side Diff: chrome/browser/extensions/extension_service_unittest.cc

Issue 11027070: Moved JsonPrefStore to use SequencedWorkerPool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
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/extensions/extension_service_unittest.h" 5 #include "chrome/browser/extensions/extension_service_unittest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 } 415 }
416 416
417 void ExtensionServiceTestBase::InitializeExtensionService( 417 void ExtensionServiceTestBase::InitializeExtensionService(
418 const FilePath& profile_path, 418 const FilePath& profile_path,
419 const FilePath& pref_file, 419 const FilePath& pref_file,
420 const FilePath& extensions_install_dir, 420 const FilePath& extensions_install_dir,
421 bool autoupdate_enabled) { 421 bool autoupdate_enabled) {
422 TestingProfile::Builder profile_builder; 422 TestingProfile::Builder profile_builder;
423 // Create a PrefService that only contains user defined preference values. 423 // Create a PrefService that only contains user defined preference values.
424 scoped_ptr<PrefService> prefs( 424 scoped_ptr<PrefService> prefs(
425 PrefServiceMockBuilder().WithUserFilePrefs(pref_file).Create()); 425 PrefServiceMockBuilder().WithUserFilePrefs(
426 pref_file, loop_.message_loop_proxy()).Create());
426 Profile::RegisterUserPrefs(prefs.get()); 427 Profile::RegisterUserPrefs(prefs.get());
427 chrome::RegisterUserPrefs(prefs.get()); 428 chrome::RegisterUserPrefs(prefs.get());
428 profile_builder.SetPrefService(prefs.Pass()); 429 profile_builder.SetPrefService(prefs.Pass());
429 profile_builder.SetPath(profile_path); 430 profile_builder.SetPath(profile_path);
430 profile_ = profile_builder.Build(); 431 profile_ = profile_builder.Build();
431 432
432 service_ = static_cast<extensions::TestExtensionSystem*>( 433 service_ = static_cast<extensions::TestExtensionSystem*>(
433 ExtensionSystem::Get(profile_.get()))->CreateExtensionService( 434 ExtensionSystem::Get(profile_.get()))->CreateExtensionService(
434 CommandLine::ForCurrentProcess(), 435 CommandLine::ForCurrentProcess(),
435 extensions_install_dir, 436 extensions_install_dir,
(...skipping 5373 matching lines...) Expand 10 before | Expand all | Expand 10 after
5809 EXPECT_FALSE(extensions::HasExternalInstallError(service_)); 5810 EXPECT_FALSE(extensions::HasExternalInstallError(service_));
5810 EXPECT_FALSE(service_->IsExtensionEnabled(good_crx)); 5811 EXPECT_FALSE(service_->IsExtensionEnabled(good_crx));
5811 EXPECT_TRUE(service_->IsExtensionEnabled(page_action)); 5812 EXPECT_TRUE(service_->IsExtensionEnabled(page_action));
5812 5813
5813 ExtensionPrefs* prefs = service_->extension_prefs(); 5814 ExtensionPrefs* prefs = service_->extension_prefs();
5814 EXPECT_NE(0, prefs->GetDisableReasons(good_crx) & 5815 EXPECT_NE(0, prefs->GetDisableReasons(good_crx) &
5815 Extension::DISABLE_SIDELOAD_WIPEOUT); 5816 Extension::DISABLE_SIDELOAD_WIPEOUT);
5816 EXPECT_EQ(0, prefs->GetDisableReasons(page_action) & 5817 EXPECT_EQ(0, prefs->GetDisableReasons(page_action) &
5817 Extension::DISABLE_SIDELOAD_WIPEOUT); 5818 Extension::DISABLE_SIDELOAD_WIPEOUT);
5818 } 5819 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698