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

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

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iwyu fixes Created 4 years, 8 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 (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/policy/auto_enrollment_client.h" 5 #include "chrome/browser/chromeos/policy/auto_enrollment_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 EXPECT_EQ(expected_disabled_message, actual_disabled_message); 185 EXPECT_EQ(expected_disabled_message, actual_disabled_message);
186 } 186 }
187 187
188 const em::DeviceAutoEnrollmentRequest& auto_enrollment_request() { 188 const em::DeviceAutoEnrollmentRequest& auto_enrollment_request() {
189 return last_request_.auto_enrollment_request(); 189 return last_request_.auto_enrollment_request();
190 } 190 }
191 191
192 content::TestBrowserThreadBundle browser_threads_; 192 content::TestBrowserThreadBundle browser_threads_;
193 ScopedTestingLocalState scoped_testing_local_state_; 193 ScopedTestingLocalState scoped_testing_local_state_;
194 TestingPrefServiceSimple* local_state_; 194 TestingPrefServiceSimple* local_state_;
195 scoped_ptr<MockDeviceManagementService> service_; 195 std::unique_ptr<MockDeviceManagementService> service_;
196 scoped_ptr<AutoEnrollmentClient> client_; 196 std::unique_ptr<AutoEnrollmentClient> client_;
197 em::DeviceManagementRequest last_request_; 197 em::DeviceManagementRequest last_request_;
198 AutoEnrollmentState state_; 198 AutoEnrollmentState state_;
199 199
200 private: 200 private:
201 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentClientTest); 201 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentClientTest);
202 }; 202 };
203 203
204 TEST_F(AutoEnrollmentClientTest, NetworkFailure) { 204 TEST_F(AutoEnrollmentClientTest, NetworkFailure) {
205 ServerWillFail(DM_STATUS_TEMPORARY_UNAVAILABLE); 205 ServerWillFail(DM_STATUS_TEMPORARY_UNAVAILABLE);
206 client_->Start(); 206 client_->Start();
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 EXPECT_EQ(AUTO_ENROLLMENT_STATE_TRIGGER_ENROLLMENT, state_); 615 EXPECT_EQ(AUTO_ENROLLMENT_STATE_TRIGGER_ENROLLMENT, state_);
616 EXPECT_TRUE(HasCachedDecision()); 616 EXPECT_TRUE(HasCachedDecision());
617 VerifyServerBackedState("example.com", 617 VerifyServerBackedState("example.com",
618 kDeviceStateRestoreModeReEnrollmentEnforced, 618 kDeviceStateRestoreModeReEnrollmentEnforced,
619 kDisabledMessage); 619 kDisabledMessage);
620 Mock::VerifyAndClearExpectations(service_.get()); 620 Mock::VerifyAndClearExpectations(service_.get());
621 } 621 }
622 622
623 } // namespace 623 } // namespace
624 } // namespace policy 624 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698