| OLD | NEW |
| 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 "chrome/browser/chromeos/network_settings/onc_merger.h" | 5 #include "chromeos/network/onc/onc_merger.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/browser/chromeos/cros/onc_constants.h" | 11 #include "chromeos/network/onc/onc_constants.h" |
| 12 #include "chrome/browser/chromeos/network_settings/onc_test_utils.h" | 12 #include "chromeos/network/onc/onc_test_utils.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 namespace chromeos { | 15 namespace chromeos { |
| 16 namespace onc { | 16 namespace onc { |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 // Checks that both dictionaries contain an entry at |path| with the same value. | 19 // Checks that both dictionaries contain an entry at |path| with the same value. |
| 20 ::testing::AssertionResult HaveSameValueAt(const base::DictionaryValue& a, | 20 ::testing::AssertionResult HaveSameValueAt(const base::DictionaryValue& a, |
| 21 const base::DictionaryValue& b, | 21 const base::DictionaryValue& b, |
| 22 const std::string& path) { | 22 const std::string& path) { |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 TEST_F(ONCMergerTest, MandatoryDevicePolicyOverwritesRecommendedUserPolicy) { | 137 TEST_F(ONCMergerTest, MandatoryDevicePolicyOverwritesRecommendedUserPolicy) { |
| 138 scoped_ptr<base::DictionaryValue> merged(MergeSettingsWithPolicies( | 138 scoped_ptr<base::DictionaryValue> merged(MergeSettingsWithPolicies( |
| 139 policy_.get(), device_policy_.get(), user_.get(), NULL)); | 139 policy_.get(), device_policy_.get(), user_.get(), NULL)); |
| 140 EXPECT_TRUE(HaveSameValueAt(*merged, *device_policy_, | 140 EXPECT_TRUE(HaveSameValueAt(*merged, *device_policy_, |
| 141 "VPN.OpenVPN.Username")); | 141 "VPN.OpenVPN.Username")); |
| 142 } | 142 } |
| 143 | 143 |
| 144 } // namespace merger | 144 } // namespace merger |
| 145 } // namespace onc | 145 } // namespace onc |
| 146 } // namespace chromeos | 146 } // namespace chromeos |
| OLD | NEW |