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

Side by Side Diff: remoting/test/app_remoting_test_driver_environment_unittest.cc

Issue 1545723002: Use std::move() instead of .Pass() in remoting/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass_host
Patch Set: Created 4 years, 12 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "remoting/test/app_remoting_test_driver_environment.h" 5 #include "remoting/test/app_remoting_test_driver_environment.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility>
10 11
11 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "remoting/test/fake_access_token_fetcher.h" 14 #include "remoting/test/fake_access_token_fetcher.h"
14 #include "remoting/test/fake_app_remoting_report_issue_request.h" 15 #include "remoting/test/fake_app_remoting_report_issue_request.h"
15 #include "remoting/test/fake_refresh_token_store.h" 16 #include "remoting/test/fake_refresh_token_store.h"
16 #include "remoting/test/fake_remote_host_info_fetcher.h" 17 #include "remoting/test/fake_remote_host_info_fetcher.h"
17 #include "remoting/test/mock_access_token_fetcher.h" 18 #include "remoting/test/mock_access_token_fetcher.h"
18 #include "remoting/test/refresh_token_store.h" 19 #include "remoting/test/refresh_token_store.h"
19 #include "testing/gmock/include/gmock/gmock.h" 20 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 77 }
77 78
78 void AppRemotingTestDriverEnvironmentTest::Initialize( 79 void AppRemotingTestDriverEnvironmentTest::Initialize(
79 const AppRemotingTestDriverEnvironment::EnvironmentOptions& options) { 80 const AppRemotingTestDriverEnvironment::EnvironmentOptions& options) {
80 environment_object_.reset(new AppRemotingTestDriverEnvironment(options)); 81 environment_object_.reset(new AppRemotingTestDriverEnvironment(options));
81 82
82 scoped_ptr<FakeAccessTokenFetcher> fake_access_token_fetcher( 83 scoped_ptr<FakeAccessTokenFetcher> fake_access_token_fetcher(
83 new FakeAccessTokenFetcher()); 84 new FakeAccessTokenFetcher());
84 fake_access_token_fetcher_ = fake_access_token_fetcher.get(); 85 fake_access_token_fetcher_ = fake_access_token_fetcher.get();
85 mock_access_token_fetcher_.SetAccessTokenFetcher( 86 mock_access_token_fetcher_.SetAccessTokenFetcher(
86 fake_access_token_fetcher.Pass()); 87 std::move(fake_access_token_fetcher));
87 88
88 environment_object_->SetAccessTokenFetcherForTest( 89 environment_object_->SetAccessTokenFetcherForTest(
89 &mock_access_token_fetcher_); 90 &mock_access_token_fetcher_);
90 environment_object_->SetAppRemotingReportIssueRequestForTest( 91 environment_object_->SetAppRemotingReportIssueRequestForTest(
91 &fake_report_issue_request_); 92 &fake_report_issue_request_);
92 environment_object_->SetRefreshTokenStoreForTest(&fake_token_store_); 93 environment_object_->SetRefreshTokenStoreForTest(&fake_token_store_);
93 environment_object_->SetRemoteHostInfoFetcherForTest( 94 environment_object_->SetRemoteHostInfoFetcherForTest(
94 &fake_remote_host_info_fetcher_); 95 &fake_remote_host_info_fetcher_);
95 } 96 }
96 97
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 std::sort(expected_host_list.begin(), expected_host_list.end()); 465 std::sort(expected_host_list.begin(), expected_host_list.end());
465 466
466 EXPECT_EQ(actual_host_list.size(), expected_host_list.size()); 467 EXPECT_EQ(actual_host_list.size(), expected_host_list.size());
467 for (size_t i = 0; i < actual_host_list.size(); ++i) { 468 for (size_t i = 0; i < actual_host_list.size(); ++i) {
468 EXPECT_EQ(actual_host_list[i], expected_host_list[i]); 469 EXPECT_EQ(actual_host_list[i], expected_host_list[i]);
469 } 470 }
470 } 471 }
471 472
472 } // namespace test 473 } // namespace test
473 } // namespace remoting 474 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/test/app_remoting_latency_test_fixture.cc ('k') | remoting/test/mock_access_token_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698