| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/api/cast_channel/cast_socket.h" | 5 #include "extensions/browser/api/cast_channel/cast_socket.h" |
| 6 | 6 |
| 7 #include "base/memory/weak_ptr.h" | 7 #include "base/memory/weak_ptr.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 net::AddressList(), &capturing_net_log_, ssl_data_.get())); | 296 net::AddressList(), &capturing_net_log_, ssl_data_.get())); |
| 297 } | 297 } |
| 298 | 298 |
| 299 virtual bool ExtractPeerCert(std::string* cert) OVERRIDE { | 299 virtual bool ExtractPeerCert(std::string* cert) OVERRIDE { |
| 300 if (extract_cert_result_) | 300 if (extract_cert_result_) |
| 301 cert->assign("dummy_test_cert"); | 301 cert->assign("dummy_test_cert"); |
| 302 return extract_cert_result_; | 302 return extract_cert_result_; |
| 303 } | 303 } |
| 304 | 304 |
| 305 virtual bool VerifyChallengeReply() OVERRIDE { | 305 virtual bool VerifyChallengeReply() OVERRIDE { |
| 306 EXPECT_EQ(false, verify_challenge_disallow_); | 306 EXPECT_FALSE(verify_challenge_disallow_); |
| 307 return verify_challenge_result_; | 307 return verify_challenge_result_; |
| 308 } | 308 } |
| 309 | 309 |
| 310 virtual base::Timer* GetTimer() OVERRIDE { | 310 virtual base::Timer* GetTimer() OVERRIDE { |
| 311 return mock_timer_.get(); | 311 return mock_timer_.get(); |
| 312 } | 312 } |
| 313 | 313 |
| 314 net::CapturingNetLog capturing_net_log_; | 314 net::CapturingNetLog capturing_net_log_; |
| 315 net::IPEndPoint ip_; | 315 net::IPEndPoint ip_; |
| 316 // Simulated connect data | 316 // Simulated connect data |
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1123 ConnectHelper(); | 1123 ConnectHelper(); |
| 1124 | 1124 |
| 1125 EXPECT_EQ(cast_channel::READY_STATE_CLOSED, socket_->ready_state()); | 1125 EXPECT_EQ(cast_channel::READY_STATE_CLOSED, socket_->ready_state()); |
| 1126 EXPECT_EQ(cast_channel::CHANNEL_ERROR_INVALID_MESSAGE, | 1126 EXPECT_EQ(cast_channel::CHANNEL_ERROR_INVALID_MESSAGE, |
| 1127 socket_->error_state()); | 1127 socket_->error_state()); |
| 1128 } | 1128 } |
| 1129 | 1129 |
| 1130 } // namespace cast_channel | 1130 } // namespace cast_channel |
| 1131 } // namespace core_api | 1131 } // namespace core_api |
| 1132 } // namespace extensions | 1132 } // namespace extensions |
| OLD | NEW |