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

Unified Diff: chrome/browser/ui/toolbar/toolbar_model_unittest.cc

Issue 24153012: Fix cyclic dependency between ProfilePolicyConnector and PrefService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix/Extend NetworkConfigurationUpdater unit test. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/toolbar/toolbar_model_unittest.cc
diff --git a/chrome/browser/ui/toolbar/toolbar_model_unittest.cc b/chrome/browser/ui/toolbar/toolbar_model_unittest.cc
index 8680fe440ddc5f57cc15496f409d08a1bd8184bb..0bcdde7c306ad827f40d2870153436dfc7abb60a 100644
--- a/chrome/browser/ui/toolbar/toolbar_model_unittest.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model_unittest.cc
@@ -26,6 +26,9 @@
#include "content/public/common/url_constants.h"
#include "net/base/escape.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/policy/network_policy_service_factory.h"
+#endif
// Test data ------------------------------------------------------------------
@@ -179,6 +182,12 @@ ToolbarModelTest::~ToolbarModelTest() {
void ToolbarModelTest::SetUp() {
BrowserWithTestWindowTest::SetUp();
+
+#if defined(OS_CHROMEOS)
+ policy::NetworkPolicyServiceFactory::GetInstance()->SetTestingFactory(
+ profile(), NULL);
+#endif
Joao da Silva 2013/11/11 12:38:19 Isn't it cleaner to override ServiceIsNULLWhileTes
pneubeck (no reviews) 2013/11/12 10:07:53 Done.
+
TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse(
profile(), &TemplateURLServiceFactory::BuildInstanceFor);
AutocompleteClassifierFactory::GetInstance()->SetTestingFactoryAndUse(

Powered by Google App Engine
This is Rietveld 408576698