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/policy/cloud/cloud_policy_client.h" | 5 #include "chrome/browser/policy/cloud/cloud_policy_client.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "chrome/browser/policy/cloud/mock_cloud_policy_client.h" | 13 #include "chrome/browser/policy/cloud/mock_cloud_policy_client.h" |
14 #include "chrome/browser/policy/cloud/mock_device_management_service.h" | 14 #include "chrome/browser/policy/cloud/mock_device_management_service.h" |
15 #include "chrome/browser/policy/cloud/proto/device_management_backend.pb.h" | 15 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" |
16 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 using testing::Mock; | 19 using testing::Mock; |
20 using testing::Return; | 20 using testing::Return; |
21 using testing::SaveArg; | 21 using testing::SaveArg; |
22 using testing::StrictMock; | 22 using testing::StrictMock; |
23 using testing::_; | 23 using testing::_; |
24 | 24 |
25 namespace em = enterprise_management; | 25 namespace em = enterprise_management; |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 EXPECT_CALL(service_, StartJob(_, _, _, _, _, _, _)); | 522 EXPECT_CALL(service_, StartJob(_, _, _, _, _, _, _)); |
523 EXPECT_CALL(observer_, OnClientError(_)); | 523 EXPECT_CALL(observer_, OnClientError(_)); |
524 CloudPolicyClient::StatusCallback callback = base::Bind( | 524 CloudPolicyClient::StatusCallback callback = base::Bind( |
525 &MockUploadCertificateObserver::OnUploadComplete, | 525 &MockUploadCertificateObserver::OnUploadComplete, |
526 base::Unretained(&upload_certificate_observer_)); | 526 base::Unretained(&upload_certificate_observer_)); |
527 client_->UploadCertificate(kDeviceCertificate, callback); | 527 client_->UploadCertificate(kDeviceCertificate, callback); |
528 EXPECT_EQ(DM_STATUS_REQUEST_FAILED, client_->status()); | 528 EXPECT_EQ(DM_STATUS_REQUEST_FAILED, client_->status()); |
529 } | 529 } |
530 | 530 |
531 } // namespace policy | 531 } // namespace policy |
OLD | NEW |