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

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

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU 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
« no previous file with comments | « remoting/test/host_list_fetcher.cc ('k') | remoting/test/mock_access_token_fetcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/host_list_fetcher.h" 5 #include "remoting/test/host_list_fetcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 void SetUp() override; 187 void SetUp() override;
188 188
189 // Sets the HTTP status and data returned for a specified URL. 189 // Sets the HTTP status and data returned for a specified URL.
190 void SetFakeResponse(const GURL& url, 190 void SetFakeResponse(const GURL& url,
191 const std::string& data, 191 const std::string& data,
192 net::HttpStatusCode code, 192 net::HttpStatusCode code,
193 net::URLRequestStatus::Status status); 193 net::URLRequestStatus::Status status);
194 194
195 private: 195 private:
196 net::FakeURLFetcherFactory url_fetcher_factory_; 196 net::FakeURLFetcherFactory url_fetcher_factory_;
197 scoped_ptr<base::MessageLoopForIO> message_loop_; 197 std::unique_ptr<base::MessageLoopForIO> message_loop_;
198 198
199 DISALLOW_COPY_AND_ASSIGN(HostListFetcherTest); 199 DISALLOW_COPY_AND_ASSIGN(HostListFetcherTest);
200 }; 200 };
201 201
202 void HostListFetcherTest::SetUp() { 202 void HostListFetcherTest::SetUp() {
203 DCHECK(!message_loop_); 203 DCHECK(!message_loop_);
204 message_loop_.reset(new base::MessageLoopForIO); 204 message_loop_.reset(new base::MessageLoopForIO);
205 205
206 SetFakeResponse(GURL(kHostListProdRequestUrl), 206 SetFakeResponse(GURL(kHostListProdRequestUrl),
207 kHostListEmptyResponse, net::HTTP_NOT_FOUND, 207 kHostListEmptyResponse, net::HTTP_NOT_FOUND,
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 empty_host_list_callback); 436 empty_host_list_callback);
437 437
438 empty_items_run_loop.Run(); 438 empty_items_run_loop.Run();
439 439
440 // If we received an empty items response, then host list should be empty. 440 // If we received an empty items response, then host list should be empty.
441 EXPECT_TRUE(empty_items_hostlist.empty()); 441 EXPECT_TRUE(empty_items_hostlist.empty());
442 } 442 }
443 443
444 } // namespace test 444 } // namespace test
445 } // namespace remoting 445 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/test/host_list_fetcher.cc ('k') | remoting/test/mock_access_token_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698