| OLD | NEW |
| 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/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 } // namespace | 80 } // namespace |
| 81 | 81 |
| 82 class PolicyUITest : public InProcessBrowserTest { | 82 class PolicyUITest : public InProcessBrowserTest { |
| 83 public: | 83 public: |
| 84 PolicyUITest(); | 84 PolicyUITest(); |
| 85 virtual ~PolicyUITest(); | 85 virtual ~PolicyUITest(); |
| 86 | 86 |
| 87 protected: | 87 protected: |
| 88 // InProcessBrowserTest implementation. | 88 // InProcessBrowserTest implementation. |
| 89 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; | 89 virtual void SetUpInProcessBrowserTestFixture() override; |
| 90 | 90 |
| 91 void UpdateProviderPolicy(const policy::PolicyMap& policy); | 91 void UpdateProviderPolicy(const policy::PolicyMap& policy); |
| 92 | 92 |
| 93 void VerifyPolicies(const std::vector<std::vector<std::string> >& expected); | 93 void VerifyPolicies(const std::vector<std::vector<std::string> >& expected); |
| 94 | 94 |
| 95 private: | 95 private: |
| 96 policy::MockConfigurationPolicyProvider provider_; | 96 policy::MockConfigurationPolicyProvider provider_; |
| 97 | 97 |
| 98 DISALLOW_COPY_AND_ASSIGN(PolicyUITest); | 98 DISALLOW_COPY_AND_ASSIGN(PolicyUITest); |
| 99 }; | 99 }; |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 expected_policies.begin() + first_unset_position++, | 260 expected_policies.begin() + first_unset_position++, |
| 261 PopulateExpectedPolicy(kUnknownPolicy, | 261 PopulateExpectedPolicy(kUnknownPolicy, |
| 262 expected_values[kUnknownPolicy], | 262 expected_values[kUnknownPolicy], |
| 263 values.Get(kUnknownPolicy), | 263 values.Get(kUnknownPolicy), |
| 264 true)); | 264 true)); |
| 265 | 265 |
| 266 // Retrieve the contents of the policy table from the UI and verify that it | 266 // Retrieve the contents of the policy table from the UI and verify that it |
| 267 // matches the expectation. | 267 // matches the expectation. |
| 268 VerifyPolicies(expected_policies); | 268 VerifyPolicies(expected_policies); |
| 269 } | 269 } |
| OLD | NEW |