OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/login/signed_settings.h" | 5 #include "chrome/browser/chromeos/login/signed_settings.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/scoped_temp_dir.h" | 9 #include "base/scoped_temp_dir.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
11 #include "chrome/browser/chromeos/cros/cros_library.h" | 11 #include "chrome/browser/chromeos/cros/cros_library.h" |
12 #include "chrome/browser/chromeos/cros/mock_library_loader.h" | 12 #include "chrome/browser/chromeos/cros/mock_library_loader.h" |
13 #include "chrome/browser/chromeos/cros_settings_names.h" | 13 #include "chrome/browser/chromeos/cros_settings_names.h" |
14 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 14 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
15 #include "chrome/browser/chromeos/dbus/mock_session_manager_client.h" | 15 #include "chrome/browser/chromeos/dbus/mock_session_manager_client.h" |
16 #include "chrome/browser/chromeos/login/mock_owner_key_utils.h" | 16 #include "chrome/browser/chromeos/login/mock_owner_key_utils.h" |
17 #include "chrome/browser/chromeos/login/mock_ownership_service.h" | 17 #include "chrome/browser/chromeos/login/mock_ownership_service.h" |
18 #include "chrome/browser/chromeos/login/owner_manager_unittest.h" | 18 #include "chrome/browser/chromeos/login/owner_manager_unittest.h" |
19 #include "chrome/browser/policy/proto/chrome_device_policy.pb.h" | 19 #include "chrome/browser/policy/proto/chrome_device_policy.pb.h" |
20 #include "chrome/browser/policy/proto/device_management_backend.pb.h" | 20 #include "chrome/browser/policy/proto/device_management_backend.pb.h" |
21 #include "content/browser/browser_thread.h" | 21 #include "content/test/test_browser_thread.h" |
22 #include "crypto/rsa_private_key.h" | 22 #include "crypto/rsa_private_key.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 using ::testing::A; | 26 using ::testing::A; |
27 using ::testing::AnyNumber; | 27 using ::testing::AnyNumber; |
28 using ::testing::Return; | 28 using ::testing::Return; |
29 using ::testing::ReturnRef; | 29 using ::testing::ReturnRef; |
30 using ::testing::SaveArg; | 30 using ::testing::SaveArg; |
31 using ::testing::StrEq; | 31 using ::testing::StrEq; |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 const std::string fake_email_; | 268 const std::string fake_email_; |
269 const std::string fake_domain_; | 269 const std::string fake_domain_; |
270 const std::string fake_prop_; | 270 const std::string fake_prop_; |
271 const std::string fake_value_; | 271 const std::string fake_value_; |
272 MockOwnershipService m_; | 272 MockOwnershipService m_; |
273 | 273 |
274 ScopedTempDir tmpdir_; | 274 ScopedTempDir tmpdir_; |
275 FilePath tmpfile_; | 275 FilePath tmpfile_; |
276 | 276 |
277 MessageLoop message_loop_; | 277 MessageLoop message_loop_; |
278 BrowserThread ui_thread_; | 278 content::TestBrowserThread ui_thread_; |
279 BrowserThread file_thread_; | 279 content::TestBrowserThread file_thread_; |
280 | 280 |
281 std::vector<uint8> fake_public_key_; | 281 std::vector<uint8> fake_public_key_; |
282 scoped_ptr<crypto::RSAPrivateKey> fake_private_key_; | 282 scoped_ptr<crypto::RSAPrivateKey> fake_private_key_; |
283 | 283 |
284 MockKeyUtils* mock_; | 284 MockKeyUtils* mock_; |
285 MockInjector injector_; | 285 MockInjector injector_; |
286 | 286 |
287 ScopedStubCrosEnabler stub_cros_enabler_; | 287 ScopedStubCrosEnabler stub_cros_enabler_; |
288 }; | 288 }; |
289 | 289 |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 .Times(1); | 757 .Times(1); |
758 | 758 |
759 s->Execute(); | 759 s->Execute(); |
760 message_loop_.RunAllPending(); | 760 message_loop_.RunAllPending(); |
761 | 761 |
762 s->OnKeyOpComplete(OwnerManager::OPERATION_FAILED, std::vector<uint8>()); | 762 s->OnKeyOpComplete(OwnerManager::OPERATION_FAILED, std::vector<uint8>()); |
763 message_loop_.RunAllPending(); | 763 message_loop_.RunAllPending(); |
764 } | 764 } |
765 | 765 |
766 } // namespace chromeos | 766 } // namespace chromeos |
OLD | NEW |