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

Side by Side Diff: chrome/browser/chromeos/settings/device_settings_provider_unittest.cc

Issue 108563005: Move the cloud policy protobufs into the component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years 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 "chrome/browser/chromeos/settings/device_settings_provider.h" 5 #include "chrome/browser/chromeos/settings/device_settings_provider.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/test/scoped_path_override.h" 13 #include "base/test/scoped_path_override.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "chrome/browser/chromeos/policy/device_local_account.h" 15 #include "chrome/browser/chromeos/policy/device_local_account.h"
16 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h"
16 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" 17 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h"
17 #include "chrome/browser/policy/proto/chromeos/chrome_device_policy.pb.h"
18 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h"
19 #include "chrome/common/chrome_paths.h" 18 #include "chrome/common/chrome_paths.h"
20 #include "chrome/test/base/scoped_testing_local_state.h" 19 #include "chrome/test/base/scoped_testing_local_state.h"
21 #include "chrome/test/base/testing_browser_process.h" 20 #include "chrome/test/base/testing_browser_process.h"
22 #include "chromeos/settings/cros_settings_names.h" 21 #include "chromeos/settings/cros_settings_names.h"
22 #include "policy/proto/device_management_backend.pb.h"
23 #include "testing/gmock/include/gmock/gmock.h" 23 #include "testing/gmock/include/gmock/gmock.h"
24 #include "testing/gtest/include/gtest/gtest.h" 24 #include "testing/gtest/include/gtest/gtest.h"
25 25
26 namespace em = enterprise_management; 26 namespace em = enterprise_management;
27 27
28 namespace chromeos { 28 namespace chromeos {
29 29
30 using ::testing::AnyNumber; 30 using ::testing::AnyNumber;
31 using ::testing::Mock; 31 using ::testing::Mock;
32 using ::testing::_; 32 using ::testing::_;
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 policy::PolicyBuilder::kFakeUsername); 279 policy::PolicyBuilder::kFakeUsername);
280 entry_dict->SetInteger(kAccountsPrefDeviceLocalAccountsKeyType, 280 entry_dict->SetInteger(kAccountsPrefDeviceLocalAccountsKeyType,
281 policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION); 281 policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION);
282 expected_accounts.Append(entry_dict.release()); 282 expected_accounts.Append(entry_dict.release());
283 const base::Value* actual_accounts = 283 const base::Value* actual_accounts =
284 provider_->Get(kAccountsPrefDeviceLocalAccounts); 284 provider_->Get(kAccountsPrefDeviceLocalAccounts);
285 EXPECT_TRUE(base::Value::Equals(&expected_accounts, actual_accounts)); 285 EXPECT_TRUE(base::Value::Equals(&expected_accounts, actual_accounts));
286 } 286 }
287 287
288 } // namespace chromeos 288 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698