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

Unified Diff: chrome/browser/extensions/external_provider_impl_unittest.cc

Issue 236013002: Apply default wallpaper from customization manifest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove wallpaper URL from ServicesCustomizationDocumentTest. Created 6 years, 8 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/external_provider_impl_unittest.cc
diff --git a/chrome/browser/extensions/external_provider_impl_unittest.cc b/chrome/browser/extensions/external_provider_impl_unittest.cc
index 3b82b78e6559ea543e6fbec755addff55885e1d9..27e8c5559baec8e310d32aa28cd0a6ca611e74d3 100644
--- a/chrome/browser/extensions/external_provider_impl_unittest.cc
+++ b/chrome/browser/extensions/external_provider_impl_unittest.cc
@@ -9,6 +9,7 @@
#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
+#include "base/prefs/testing_pref_service.h"
#include "base/strings/stringprintf.h"
#include "base/test/scoped_path_override.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -16,6 +17,7 @@
#include "chrome/browser/extensions/updater/extension_cache_fake.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_utils.h"
@@ -25,6 +27,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/customization_document.h"
#include "chromeos/system/mock_statistics_provider.h"
#include "chromeos/system/statistics_provider.h"
#endif
@@ -65,6 +68,13 @@ class ExternalProviderImplTest : public ExtensionServiceTestBase {
virtual void SetUp() OVERRIDE {
ExtensionServiceTestBase::SetUp();
test_server_.reset(new EmbeddedTestServer());
+
+#if defined(OS_CHROMEOS)
+ TestingBrowserProcess::GetGlobal()->SetLocalState(&local_state_);
+ chromeos::ServicesCustomizationDocument::RegisterPrefs(
+ local_state_.registry());
+#endif
+
ASSERT_TRUE(test_server_->InitializeAndWaitUntilReady());
test_server_->RegisterRequestHandler(
base::Bind(&ExternalProviderImplTest::HandleRequest,
@@ -86,6 +96,7 @@ class ExternalProviderImplTest : public ExtensionServiceTestBase {
virtual void TearDown() OVERRIDE {
#if defined(OS_CHROMEOS)
chromeos::system::StatisticsProvider::SetTestProvider(NULL);
+ TestingBrowserProcess::GetGlobal()->SetLocalState(NULL);
#endif
}
@@ -128,6 +139,7 @@ class ExternalProviderImplTest : public ExtensionServiceTestBase {
scoped_ptr<ExtensionCacheFake> test_extension_cache_;
#if defined(OS_CHROMEOS)
chromeos::system::MockStatisticsProvider mock_statistics_provider_;
+ TestingPrefServiceSimple local_state_;
#endif
DISALLOW_COPY_AND_ASSIGN(ExternalProviderImplTest);

Powered by Google App Engine
This is Rietveld 408576698