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

Side by Side Diff: chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos_unittest.cc

Issue 109743002: Move policy code into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar 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/policy/device_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/prefs/pref_registry_simple.h" 11 #include "base/prefs/pref_registry_simple.h"
12 #include "base/prefs/testing_pref_service.h" 12 #include "base/prefs/testing_pref_service.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h" 14 #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h"
15 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" 15 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h"
16 #include "chrome/browser/chromeos/settings/cros_settings.h" 16 #include "chrome/browser/chromeos/settings/cros_settings.h"
17 #include "chrome/browser/chromeos/settings/device_oauth2_token_service.h" 17 #include "chrome/browser/chromeos/settings/device_oauth2_token_service.h"
18 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h " 18 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h "
19 #include "chrome/browser/chromeos/settings/device_settings_service.h" 19 #include "chrome/browser/chromeos/settings/device_settings_service.h"
20 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" 20 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h"
21 #include "chrome/browser/policy/cloud/cloud_policy_client.h"
22 #include "chrome/browser/policy/cloud/mock_device_management_service.h"
23 #include "chrome/browser/policy/proto/chromeos/chrome_device_policy.pb.h" 21 #include "chrome/browser/policy/proto/chromeos/chrome_device_policy.pb.h"
24 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" 22 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h"
25 #include "chrome/browser/prefs/browser_prefs.h" 23 #include "chrome/browser/prefs/browser_prefs.h"
26 #include "chrome/test/base/testing_browser_process.h" 24 #include "chrome/test/base/testing_browser_process.h"
27 #include "chromeos/cryptohome/system_salt_getter.h" 25 #include "chromeos/cryptohome/system_salt_getter.h"
28 #include "chromeos/dbus/dbus_client_implementation_type.h" 26 #include "chromeos/dbus/dbus_client_implementation_type.h"
29 #include "chromeos/dbus/dbus_thread_manager.h" 27 #include "chromeos/dbus/dbus_thread_manager.h"
30 #include "chromeos/system/mock_statistics_provider.h" 28 #include "chromeos/system/mock_statistics_provider.h"
31 #include "chromeos/system/statistics_provider.h" 29 #include "chromeos/system/statistics_provider.h"
30 #include "components/policy/core/common/cloud/cloud_policy_client.h"
31 #include "components/policy/core/common/cloud/mock_device_management_service.h"
32 #include "components/policy/core/common/external_data_fetcher.h" 32 #include "components/policy/core/common/external_data_fetcher.h"
33 #include "components/policy/core/common/schema_registry.h" 33 #include "components/policy/core/common/schema_registry.h"
34 #include "google_apis/gaia/gaia_oauth_client.h" 34 #include "google_apis/gaia/gaia_oauth_client.h"
35 #include "net/url_request/test_url_fetcher_factory.h" 35 #include "net/url_request/test_url_fetcher_factory.h"
36 #include "net/url_request/url_request_test_util.h" 36 #include "net/url_request/url_request_test_util.h"
37 #include "policy/policy_constants.h" 37 #include "policy/policy_constants.h"
38 #include "testing/gmock/include/gmock/gmock.h" 38 #include "testing/gmock/include/gmock/gmock.h"
39 #include "testing/gtest/include/gtest/gtest.h" 39 #include "testing/gtest/include/gtest/gtest.h"
40 40
41 using testing::AnyNumber; 41 using testing::AnyNumber;
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 TEST_F(DeviceCloudPolicyManagerChromeOSEnrollmentTest, LoadError) { 528 TEST_F(DeviceCloudPolicyManagerChromeOSEnrollmentTest, LoadError) {
529 loaded_blob_.clear(); 529 loaded_blob_.clear();
530 RunTest(); 530 RunTest();
531 ExpectFailedEnrollment(EnrollmentStatus::STATUS_STORE_ERROR); 531 ExpectFailedEnrollment(EnrollmentStatus::STATUS_STORE_ERROR);
532 EXPECT_EQ(CloudPolicyStore::STATUS_LOAD_ERROR, 532 EXPECT_EQ(CloudPolicyStore::STATUS_LOAD_ERROR,
533 status_.store_status()); 533 status_.store_status());
534 } 534 }
535 535
536 } // namespace 536 } // namespace
537 } // namespace policy 537 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698