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

Side by Side Diff: content/shell/test_runner/mock_webrtc_data_channel_handler.cc

Issue 2707183003: Move //components/test_runner back into //content/shell (Closed)
Patch Set: Trim DEPS Created 3 years, 10 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 "components/test_runner/mock_webrtc_data_channel_handler.h" 5 #include "content/shell/test_runner/mock_webrtc_data_channel_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "components/test_runner/web_test_delegate.h" 10 #include "content/shell/test_runner/web_test_delegate.h"
11 #include "third_party/WebKit/public/platform/WebRTCDataChannelHandlerClient.h" 11 #include "third_party/WebKit/public/platform/WebRTCDataChannelHandlerClient.h"
12 12
13 using namespace blink; 13 using namespace blink;
14 14
15 namespace test_runner { 15 namespace test_runner {
16 16
17 MockWebRTCDataChannelHandler::MockWebRTCDataChannelHandler( 17 MockWebRTCDataChannelHandler::MockWebRTCDataChannelHandler(
18 WebString label, 18 WebString label,
19 const WebRTCDataChannelInit& init, 19 const WebRTCDataChannelInit& init,
20 WebTestDelegate* delegate) 20 WebTestDelegate* delegate)
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 bool MockWebRTCDataChannelHandler::negotiated() const { 65 bool MockWebRTCDataChannelHandler::negotiated() const {
66 return init_.negotiated; 66 return init_.negotiated;
67 } 67 }
68 68
69 unsigned short MockWebRTCDataChannelHandler::id() const { 69 unsigned short MockWebRTCDataChannelHandler::id() const {
70 return init_.id; 70 return init_.id;
71 } 71 }
72 72
73 blink::WebRTCDataChannelHandlerClient::ReadyState 73 blink::WebRTCDataChannelHandlerClient::ReadyState
74 MockWebRTCDataChannelHandler::state() const { 74 MockWebRTCDataChannelHandler::state() const {
75 return blink::WebRTCDataChannelHandlerClient::ReadyStateConnecting; 75 return blink::WebRTCDataChannelHandlerClient::ReadyStateConnecting;
76 } 76 }
77 77
78 unsigned long MockWebRTCDataChannelHandler::bufferedAmount() { 78 unsigned long MockWebRTCDataChannelHandler::bufferedAmount() {
79 return 0; 79 return 0;
80 } 80 }
81 81
82 bool MockWebRTCDataChannelHandler::sendStringData(const WebString& data) { 82 bool MockWebRTCDataChannelHandler::sendStringData(const WebString& data) {
83 DCHECK(client_); 83 DCHECK(client_);
84 client_->didReceiveStringData(data); 84 client_->didReceiveStringData(data);
(...skipping 16 matching lines...) Expand all
101 void MockWebRTCDataChannelHandler::ReportOpenedState() { 101 void MockWebRTCDataChannelHandler::ReportOpenedState() {
102 client_->didChangeReadyState(WebRTCDataChannelHandlerClient::ReadyStateOpen); 102 client_->didChangeReadyState(WebRTCDataChannelHandlerClient::ReadyStateOpen);
103 } 103 }
104 104
105 void MockWebRTCDataChannelHandler::ReportClosedState() { 105 void MockWebRTCDataChannelHandler::ReportClosedState() {
106 client_->didChangeReadyState( 106 client_->didChangeReadyState(
107 WebRTCDataChannelHandlerClient::ReadyStateClosed); 107 WebRTCDataChannelHandlerClient::ReadyStateClosed);
108 } 108 }
109 109
110 } // namespace test_runner 110 } // namespace test_runner
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698