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

Side by Side Diff: chrome/browser/policy/policy_prefs_browsertest.cc

Issue 15061007: Added a PolicyDomainDescriptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 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 <algorithm> 5 #include <algorithm>
6 #include <map> 6 #include <map>
7 #include <sstream> 7 #include <sstream>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 382
383 // Base class for tests that change policy and are parameterized with a policy 383 // Base class for tests that change policy and are parameterized with a policy
384 // definition. 384 // definition.
385 class PolicyPrefsTest 385 class PolicyPrefsTest
386 : public InProcessBrowserTest, 386 : public InProcessBrowserTest,
387 public testing::WithParamInterface<PolicyDefinitionList::Entry> { 387 public testing::WithParamInterface<PolicyDefinitionList::Entry> {
388 protected: 388 protected:
389 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { 389 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
390 EXPECT_CALL(provider_, IsInitializationComplete(_)) 390 EXPECT_CALL(provider_, IsInitializationComplete(_))
391 .WillRepeatedly(Return(true)); 391 .WillRepeatedly(Return(true));
392 EXPECT_CALL(provider_, RegisterPolicyDomain(_, _)).Times(AnyNumber()); 392 EXPECT_CALL(provider_, RegisterPolicyDomain(_)).Times(AnyNumber());
393 BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); 393 BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_);
394 } 394 }
395 395
396 virtual void SetUpOnMainThread() OVERRIDE { 396 virtual void SetUpOnMainThread() OVERRIDE {
397 ui_test_utils::WaitForTemplateURLServiceToLoad( 397 ui_test_utils::WaitForTemplateURLServiceToLoad(
398 TemplateURLServiceFactory::GetForProfile(browser()->profile())); 398 TemplateURLServiceFactory::GetForProfile(browser()->profile()));
399 } 399 }
400 400
401 void UpdateProviderPolicy(const PolicyMap& policy) { 401 void UpdateProviderPolicy(const PolicyMap& policy) {
402 provider_.UpdateChromePolicy(policy); 402 provider_.UpdateChromePolicy(policy);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 } 566 }
567 } 567 }
568 568
569 INSTANTIATE_TEST_CASE_P( 569 INSTANTIATE_TEST_CASE_P(
570 PolicyPrefsTestInstance, 570 PolicyPrefsTestInstance,
571 PolicyPrefsTest, 571 PolicyPrefsTest,
572 testing::ValuesIn(GetChromePolicyDefinitionList()->begin, 572 testing::ValuesIn(GetChromePolicyDefinitionList()->begin,
573 GetChromePolicyDefinitionList()->end)); 573 GetChromePolicyDefinitionList()->end));
574 574
575 } // namespace policy 575 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_domain_descriptor_unittest.cc ('k') | chrome/browser/policy/policy_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698