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/device_settings_provider.h" | 5 #include "chrome/browser/chromeos/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/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "chrome/browser/chromeos/cros/cros_library.h" | 12 #include "chrome/browser/chromeos/cros/cros_library.h" |
13 #include "chrome/browser/chromeos/cros_settings_names.h" | 13 #include "chrome/browser/chromeos/cros_settings_names.h" |
14 #include "chrome/browser/chromeos/login/mock_signed_settings_helper.h" | 14 #include "chrome/browser/chromeos/login/mock_signed_settings_helper.h" |
15 #include "chrome/browser/chromeos/login/mock_user_manager.h" | 15 #include "chrome/browser/chromeos/login/mock_user_manager.h" |
16 #include "chrome/browser/chromeos/login/ownership_service.h" | 16 #include "chrome/browser/chromeos/login/ownership_service.h" |
17 #include "chrome/browser/policy/proto/chrome_device_policy.pb.h" | 17 #include "chrome/browser/policy/proto/chrome_device_policy.pb.h" |
18 #include "chrome/browser/policy/proto/device_management_backend.pb.h" | 18 #include "chrome/browser/policy/proto/device_management_backend.pb.h" |
19 #include "chrome/test/base/testing_browser_process.h" | 19 #include "chrome/test/base/testing_browser_process.h" |
20 #include "chrome/test/base/testing_pref_service.h" | 20 #include "chrome/test/base/testing_pref_service.h" |
21 #include "content/test/test_browser_thread.h" | 21 #include "content/public/test/test_browser_thread.h" |
22 #include "testing/gmock/include/gmock/gmock.h" | 22 #include "testing/gmock/include/gmock/gmock.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 | 24 |
25 namespace em = enterprise_management; | 25 namespace em = enterprise_management; |
26 namespace chromeos { | 26 namespace chromeos { |
27 | 27 |
28 using ::testing::_; | 28 using ::testing::_; |
29 using ::testing::AnyNumber; | 29 using ::testing::AnyNumber; |
30 using ::testing::Mock; | 30 using ::testing::Mock; |
31 using ::testing::Return; | 31 using ::testing::Return; |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 // Verify that the cache policy blob is not "trusted". | 233 // Verify that the cache policy blob is not "trusted". |
234 EXPECT_EQ(CrosSettingsProvider::TRUSTED, | 234 EXPECT_EQ(CrosSettingsProvider::TRUSTED, |
235 provider_->PrepareTrustedValues( | 235 provider_->PrepareTrustedValues( |
236 base::Bind(&DeviceSettingsProviderTest::GetTrustedCallback, | 236 base::Bind(&DeviceSettingsProviderTest::GetTrustedCallback, |
237 base::Unretained(this)))); | 237 base::Unretained(this)))); |
238 // The trusted flag should be established already prior to calling GetTrusted. | 238 // The trusted flag should be established already prior to calling GetTrusted. |
239 message_loop_.RunAllPending(); | 239 message_loop_.RunAllPending(); |
240 } | 240 } |
241 | 241 |
242 } // namespace chromeos | 242 } // namespace chromeos |
OLD | NEW |