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

Side by Side Diff: chrome/browser/ui/webui/policy_ui_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
« no previous file with comments | « chrome/browser/ui/webui/options/preferences_browsertest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <vector> 5 #include <vector>
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/policy/browser_policy_connector.h" 10 #include "chrome/browser/policy/browser_policy_connector.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 PolicyUITest::PolicyUITest() { 99 PolicyUITest::PolicyUITest() {
100 } 100 }
101 101
102 PolicyUITest::~PolicyUITest() { 102 PolicyUITest::~PolicyUITest() {
103 } 103 }
104 104
105 void PolicyUITest::SetUpInProcessBrowserTestFixture() { 105 void PolicyUITest::SetUpInProcessBrowserTestFixture() {
106 EXPECT_CALL(provider_, IsInitializationComplete(_)) 106 EXPECT_CALL(provider_, IsInitializationComplete(_))
107 .WillRepeatedly(Return(true)); 107 .WillRepeatedly(Return(true));
108 EXPECT_CALL(provider_, RegisterPolicyDomain(_, _)).Times(AnyNumber()); 108 EXPECT_CALL(provider_, RegisterPolicyDomain(_)).Times(AnyNumber());
109 policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); 109 policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_);
110 } 110 }
111 111
112 void PolicyUITest::UpdateProviderPolicy(const policy::PolicyMap& policy) { 112 void PolicyUITest::UpdateProviderPolicy(const policy::PolicyMap& policy) {
113 provider_.UpdateChromePolicy(policy); 113 provider_.UpdateChromePolicy(policy);
114 base::RunLoop loop; 114 base::RunLoop loop;
115 loop.RunUntilIdle(); 115 loop.RunUntilIdle();
116 } 116 }
117 117
118 void PolicyUITest::VerifyPolicies( 118 void PolicyUITest::VerifyPolicies(
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 expected_policies.begin() + first_unset_position++, 252 expected_policies.begin() + first_unset_position++,
253 PopulateExpectedPolicy(kUnknownPolicy, 253 PopulateExpectedPolicy(kUnknownPolicy,
254 expected_values[kUnknownPolicy], 254 expected_values[kUnknownPolicy],
255 values.Get(kUnknownPolicy), 255 values.Get(kUnknownPolicy),
256 true)); 256 true));
257 257
258 // Retrieve the contents of the policy table from the UI and verify that it 258 // Retrieve the contents of the policy table from the UI and verify that it
259 // matches the expectation. 259 // matches the expectation.
260 VerifyPolicies(expected_policies); 260 VerifyPolicies(expected_policies);
261 } 261 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/preferences_browsertest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698