OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // A set of unit tests for TokenValidatorFactoryImpl | 5 // A set of unit tests for TokenValidatorFactoryImpl |
6 | 6 |
7 #include "remoting/host/token_validator_factory_impl.h" | 7 #include "remoting/host/token_validator_factory_impl.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/json/json_writer.h" | 12 #include "base/json/json_writer.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 14 #include "base/message_loop/message_loop.h" |
14 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
15 #include "base/values.h" | 16 #include "base/values.h" |
16 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
17 #include "net/http/http_status_code.h" | 18 #include "net/http/http_status_code.h" |
18 #include "net/test/url_request/url_request_failed_job.h" | 19 #include "net/test/url_request/url_request_failed_job.h" |
19 #include "net/url_request/url_request_job_factory.h" | 20 #include "net/url_request/url_request_job_factory.h" |
20 #include "net/url_request/url_request_job_factory_impl.h" | 21 #include "net/url_request/url_request_job_factory_impl.h" |
21 #include "net/url_request/url_request_status.h" | 22 #include "net/url_request/url_request_status.h" |
22 #include "net/url_request/url_request_test_job.h" | 23 #include "net/url_request/url_request_test_job.h" |
23 #include "net/url_request/url_request_test_util.h" | 24 #include "net/url_request/url_request_test_util.h" |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 SetErrorResponse(net::URLRequestFailedJob::READ_ASYNC, net::ERR_FAILED); | 269 SetErrorResponse(net::URLRequestFailedJob::READ_ASYNC, net::ERR_FAILED); |
269 | 270 |
270 token_validator_->ValidateThirdPartyToken( | 271 token_validator_->ValidateThirdPartyToken( |
271 kToken, | 272 kToken, |
272 base::Bind(&TokenValidatorFactoryImplTest::DeleteOnFailureCallback, | 273 base::Bind(&TokenValidatorFactoryImplTest::DeleteOnFailureCallback, |
273 base::Unretained(this))); | 274 base::Unretained(this))); |
274 base::RunLoop().Run(); | 275 base::RunLoop().Run(); |
275 } | 276 } |
276 | 277 |
277 } // namespace remoting | 278 } // namespace remoting |
OLD | NEW |