OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "blimp/client/session/assignment_source.h" | 5 #include "blimp/client/core/session/assignment_source.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
11 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
(...skipping 21 matching lines...) Expand all Loading... |
37 namespace blimp { | 37 namespace blimp { |
38 namespace client { | 38 namespace client { |
39 namespace { | 39 namespace { |
40 | 40 |
41 const uint8_t kTestIpAddress[] = {127, 0, 0, 1}; | 41 const uint8_t kTestIpAddress[] = {127, 0, 0, 1}; |
42 const uint16_t kTestPort = 8086; | 42 const uint16_t kTestPort = 8086; |
43 const char kTestIpAddressString[] = "127.0.0.1"; | 43 const char kTestIpAddressString[] = "127.0.0.1"; |
44 const char kTcpTransportName[] = "tcp"; | 44 const char kTcpTransportName[] = "tcp"; |
45 const char kSslTransportName[] = "ssl"; | 45 const char kSslTransportName[] = "ssl"; |
46 const char kCertRelativePath[] = | 46 const char kCertRelativePath[] = |
47 "blimp/client/session/test_selfsigned_cert.pem"; | 47 "blimp/client/core/session/test_selfsigned_cert.pem"; |
48 const char kTestClientToken[] = "secrett0ken"; | 48 const char kTestClientToken[] = "secrett0ken"; |
49 const char kTestAuthToken[] = "UserAuthT0kenz"; | 49 const char kTestAuthToken[] = "UserAuthT0kenz"; |
50 const char kAssignerUrl[] = "http://www.assigner.test/"; | 50 const char kAssignerUrl[] = "http://www.assigner.test/"; |
51 const char kTestClientTokenPath[] = "blimp/test/data/test_client_token"; | 51 const char kTestClientTokenPath[] = "blimp/test/data/test_client_token"; |
52 | 52 |
53 MATCHER_P(AssignmentEquals, assignment, "") { | 53 MATCHER_P(AssignmentEquals, assignment, "") { |
54 return arg.transport_protocol == assignment.transport_protocol && | 54 return arg.transport_protocol == assignment.transport_protocol && |
55 arg.engine_endpoint == assignment.engine_endpoint && | 55 arg.engine_endpoint == assignment.engine_endpoint && |
56 arg.client_token == assignment.client_token && | 56 arg.client_token == assignment.client_token && |
57 ((!assignment.cert && !arg.cert) || | 57 ((!assignment.cert && !arg.cert) || |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 EXPECT_CALL(*this, AssignmentResponse( | 391 EXPECT_CALL(*this, AssignmentResponse( |
392 AssignmentSource::Result::RESULT_INVALID_CERT, _)); | 392 AssignmentSource::Result::RESULT_INVALID_CERT, _)); |
393 GetNetworkAssignmentAndWaitForResponse(net::HTTP_OK, net::Error::OK, | 393 GetNetworkAssignmentAndWaitForResponse(net::HTTP_OK, net::Error::OK, |
394 ValueToString(*response), | 394 ValueToString(*response), |
395 kTestAuthToken, kProtocolVersion); | 395 kTestAuthToken, kProtocolVersion); |
396 } | 396 } |
397 | 397 |
398 } // namespace | 398 } // namespace |
399 } // namespace client | 399 } // namespace client |
400 } // namespace blimp | 400 } // namespace blimp |
OLD | NEW |