OLD | NEW |
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_report_issue_request.h" | 5 #include "remoting/test/app_remoting_report_issue_request.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 27 matching lines...) Expand all Loading... |
38 | 38 |
39 // Sets the HTTP status and data returned for a specified URL. | 39 // Sets the HTTP status and data returned for a specified URL. |
40 void SetFakeResponse(const GURL& url, | 40 void SetFakeResponse(const GURL& url, |
41 const std::string& data, | 41 const std::string& data, |
42 net::HttpStatusCode code, | 42 net::HttpStatusCode code, |
43 net::URLRequestStatus::Status status); | 43 net::URLRequestStatus::Status status); |
44 | 44 |
45 // Used for result verification. | 45 // Used for result verification. |
46 std::string dev_service_environment_url_; | 46 std::string dev_service_environment_url_; |
47 | 47 |
48 scoped_ptr<base::RunLoop> run_loop_; | 48 std::unique_ptr<base::RunLoop> run_loop_; |
49 scoped_ptr<base::Timer> timer_; | 49 std::unique_ptr<base::Timer> timer_; |
50 | 50 |
51 AppRemotingReportIssueRequest app_remoting_report_issue_request_; | 51 AppRemotingReportIssueRequest app_remoting_report_issue_request_; |
52 | 52 |
53 private: | 53 private: |
54 net::FakeURLFetcherFactory url_fetcher_factory_; | 54 net::FakeURLFetcherFactory url_fetcher_factory_; |
55 scoped_ptr<base::MessageLoopForIO> message_loop_; | 55 std::unique_ptr<base::MessageLoopForIO> message_loop_; |
56 | 56 |
57 DISALLOW_COPY_AND_ASSIGN(AppRemotingReportIssueRequestTest); | 57 DISALLOW_COPY_AND_ASSIGN(AppRemotingReportIssueRequestTest); |
58 }; | 58 }; |
59 | 59 |
60 AppRemotingReportIssueRequestTest::AppRemotingReportIssueRequestTest() | 60 AppRemotingReportIssueRequestTest::AppRemotingReportIssueRequestTest() |
61 : url_fetcher_factory_(nullptr), message_loop_(new base::MessageLoopForIO) { | 61 : url_fetcher_factory_(nullptr), message_loop_(new base::MessageLoopForIO) { |
62 } | 62 } |
63 | 63 |
64 AppRemotingReportIssueRequestTest::~AppRemotingReportIssueRequestTest() { | 64 AppRemotingReportIssueRequestTest::~AppRemotingReportIssueRequestTest() { |
65 } | 65 } |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 run_loop_->Run(); | 170 run_loop_->Run(); |
171 | 171 |
172 // Verify we stopped because of the request completing and not the timer. | 172 // Verify we stopped because of the request completing and not the timer. |
173 EXPECT_TRUE(timer_->IsRunning()); | 173 EXPECT_TRUE(timer_->IsRunning()); |
174 timer_->Stop(); | 174 timer_->Stop(); |
175 } | 175 } |
176 | 176 |
177 } // namespace test | 177 } // namespace test |
178 } // namespace remoting | 178 } // namespace remoting |
OLD | NEW |