| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/extensions/api/enterprise_platform_keys_private/enterpr
ise_platform_keys_private_api.h" | 5 #include "chrome/browser/extensions/api/enterprise_platform_keys_private/enterpr
ise_platform_keys_private_api.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "base/message_loop/message_loop_proxy.h" | 11 #include "base/message_loop/message_loop_proxy.h" |
| 12 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
| 13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
| 14 #include "base/values.h" | 14 #include "base/values.h" |
| 15 #include "chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h" | 15 #include "chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h" |
| 16 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h" | 16 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h" |
| 17 #include "chrome/browser/extensions/extension_function_test_utils.h" | 17 #include "chrome/browser/extensions/extension_function_test_utils.h" |
| 18 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" | |
| 19 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
| 20 #include "chrome/test/base/browser_with_test_window_test.h" | 19 #include "chrome/test/base/browser_with_test_window_test.h" |
| 21 #include "chromeos/attestation/attestation_constants.h" | 20 #include "chromeos/attestation/attestation_constants.h" |
| 22 #include "chromeos/attestation/mock_attestation_flow.h" | 21 #include "chromeos/attestation/mock_attestation_flow.h" |
| 23 #include "chromeos/cryptohome/async_method_caller.h" | 22 #include "chromeos/cryptohome/async_method_caller.h" |
| 24 #include "chromeos/cryptohome/mock_async_method_caller.h" | 23 #include "chromeos/cryptohome/mock_async_method_caller.h" |
| 25 #include "chromeos/dbus/dbus_method_call_status.h" | 24 #include "chromeos/dbus/dbus_method_call_status.h" |
| 26 #include "chromeos/dbus/mock_cryptohome_client.h" | 25 #include "chromeos/dbus/mock_cryptohome_client.h" |
| 27 #include "chromeos/settings/cros_settings_provider.h" | 26 #include "chromeos/settings/cros_settings_provider.h" |
| 27 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 28 #include "testing/gmock/include/gmock/gmock.h" | 28 #include "testing/gmock/include/gmock/gmock.h" |
| 29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
| 30 #include "third_party/cros_system_api/dbus/service_constants.h" | 30 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 31 | 31 |
| 32 using testing::_; | 32 using testing::_; |
| 33 using testing::Invoke; | 33 using testing::Invoke; |
| 34 using testing::NiceMock; | 34 using testing::NiceMock; |
| 35 using testing::Return; | 35 using testing::Return; |
| 36 using testing::WithArgs; | 36 using testing::WithArgs; |
| 37 | 37 |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 EXPECT_CALL(mock_cryptohome_client_, TpmAttestationIsPrepared(_)) | 511 EXPECT_CALL(mock_cryptohome_client_, TpmAttestationIsPrepared(_)) |
| 512 .WillRepeatedly(Invoke(FakeBoolDBusMethod( | 512 .WillRepeatedly(Invoke(FakeBoolDBusMethod( |
| 513 chromeos::DBUS_METHOD_CALL_FAILURE, true))); | 513 chromeos::DBUS_METHOD_CALL_FAILURE, true))); |
| 514 | 514 |
| 515 EXPECT_EQ(GetCertificateError(kDBusError), | 515 EXPECT_EQ(GetCertificateError(kDBusError), |
| 516 utils::RunFunctionAndReturnError(func_.get(), kArgs, browser())); | 516 utils::RunFunctionAndReturnError(func_.get(), kArgs, browser())); |
| 517 } | 517 } |
| 518 | 518 |
| 519 } // namespace | 519 } // namespace |
| 520 } // namespace extensions | 520 } // namespace extensions |
| OLD | NEW |