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

Side by Side Diff: extensions/browser/api/cast_channel/cast_socket_unittest.cc

Issue 807723004: Cast audio only policy enforcement support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review changes Created 5 years, 11 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
OLDNEW
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 <vector> 7 #include <vector>
8 8
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 explicit TestCastSocket(const net::IPEndPoint& ip_endpoint, 190 explicit TestCastSocket(const net::IPEndPoint& ip_endpoint,
191 ChannelAuthType channel_auth, 191 ChannelAuthType channel_auth,
192 int64 timeout_ms, 192 int64 timeout_ms,
193 Logger* logger) 193 Logger* logger)
194 : CastSocketImpl("some_extension_id", 194 : CastSocketImpl("some_extension_id",
195 ip_endpoint, 195 ip_endpoint,
196 channel_auth, 196 channel_auth,
197 &capturing_net_log_, 197 &capturing_net_log_,
198 base::TimeDelta::FromMilliseconds(timeout_ms), 198 base::TimeDelta::FromMilliseconds(timeout_ms),
199 logger), 199 logger,
200 0),
mark a. foltz 2015/01/13 01:42:19 Use constant suggested earlier
vadimgo 2015/01/13 02:21:44 Changed the cast socket unit test to use device ca
200 ip_(ip_endpoint), 201 ip_(ip_endpoint),
201 connect_index_(0), 202 connect_index_(0),
202 extract_cert_result_(true), 203 extract_cert_result_(true),
203 verify_challenge_result_(true), 204 verify_challenge_result_(true),
204 verify_challenge_disallow_(false), 205 verify_challenge_disallow_(false),
205 tcp_unresponsive_(false), 206 tcp_unresponsive_(false),
206 mock_timer_(new base::MockTimer(false, false)), 207 mock_timer_(new base::MockTimer(false, false)),
207 mock_transport_(NULL) {} 208 mock_transport_(NULL) {}
208 209
209 ~TestCastSocket() override {} 210 ~TestCastSocket() override {}
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 test_message, base::Bind(&CompleteHandler::OnWriteComplete, 858 test_message, base::Bind(&CompleteHandler::OnWriteComplete,
858 base::Unretained(&handler_))); 859 base::Unretained(&handler_)));
859 RunPendingTasks(); 860 RunPendingTasks();
860 861
861 EXPECT_EQ(cast_channel::READY_STATE_OPEN, socket_->ready_state()); 862 EXPECT_EQ(cast_channel::READY_STATE_OPEN, socket_->ready_state());
862 EXPECT_EQ(cast_channel::CHANNEL_ERROR_NONE, socket_->error_state()); 863 EXPECT_EQ(cast_channel::CHANNEL_ERROR_NONE, socket_->error_state());
863 } 864 }
864 } // namespace cast_channel 865 } // namespace cast_channel
865 } // namespace core_api 866 } // namespace core_api
866 } // namespace extensions 867 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698