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

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

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/consumer_management_service.h" 5 #include "chrome/browser/chromeos/policy/consumer_management_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/prefs/pref_registry_simple.h"
11 #include "base/prefs/pref_service.h"
12 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
13 #include "chrome/browser/chromeos/policy/device_policy_builder.h" 11 #include "chrome/browser/chromeos/policy/device_policy_builder.h"
14 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" 12 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h"
15 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
16 #include "chrome/test/base/browser_with_test_window_test.h" 14 #include "chrome/test/base/browser_with_test_window_test.h"
17 #include "chrome/test/base/scoped_testing_local_state.h" 15 #include "chrome/test/base/scoped_testing_local_state.h"
18 #include "chrome/test/base/testing_browser_process.h" 16 #include "chrome/test/base/testing_browser_process.h"
19 #include "chrome/test/base/testing_profile_manager.h" 17 #include "chrome/test/base/testing_profile_manager.h"
20 #include "chromeos/dbus/cryptohome/rpc.pb.h" 18 #include "chromeos/dbus/cryptohome/rpc.pb.h"
21 #include "chromeos/dbus/cryptohome_client.h" 19 #include "chromeos/dbus/cryptohome_client.h"
22 #include "chromeos/dbus/mock_cryptohome_client.h" 20 #include "chromeos/dbus/mock_cryptohome_client.h"
21 #include "components/prefs/pref_registry_simple.h"
22 #include "components/prefs/pref_service.h"
23 #include "policy/proto/device_management_backend.pb.h" 23 #include "policy/proto/device_management_backend.pb.h"
24 #include "testing/gmock/include/gmock/gmock.h" 24 #include "testing/gmock/include/gmock/gmock.h"
25 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
26 26
27 using testing::Invoke; 27 using testing::Invoke;
28 using testing::NiceMock; 28 using testing::NiceMock;
29 using testing::_; 29 using testing::_;
30 30
31 namespace em = enterprise_management; 31 namespace em = enterprise_management;
32 32
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 service_.GetStatus()); 244 service_.GetStatus());
245 EXPECT_EQ("StatusUnenrolling", service_.GetStatusString()); 245 EXPECT_EQ("StatusUnenrolling", service_.GetStatusString());
246 246
247 SetManagementMode(em::PolicyData::LOCAL_OWNER); 247 SetManagementMode(em::PolicyData::LOCAL_OWNER);
248 SetStageInLocalState(ConsumerManagementStage::UnenrollmentSuccess()); 248 SetStageInLocalState(ConsumerManagementStage::UnenrollmentSuccess());
249 EXPECT_EQ(ConsumerManagementService::STATUS_UNENROLLED, service_.GetStatus()); 249 EXPECT_EQ(ConsumerManagementService::STATUS_UNENROLLED, service_.GetStatus());
250 EXPECT_EQ("StatusUnenrolled", service_.GetStatusString()); 250 EXPECT_EQ("StatusUnenrolled", service_.GetStatusString());
251 } 251 }
252 252
253 } // namespace policy 253 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698