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

Side by Side Diff: content/shell/renderer/test_runner/MockWebRTCDataChannelHandler.h

Issue 110533009: Import TestRunner library into chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MockWebRTCDataChannelHandler_h
6 #define MockWebRTCDataChannelHandler_h
7
8 #include "content/shell/renderer/test_runner/TestCommon.h"
9 #include "content/shell/renderer/test_runner/WebTask.h"
10 #include "third_party/WebKit/public/platform/WebNonCopyable.h"
11 #include "third_party/WebKit/public/platform/WebRTCDataChannelHandler.h"
12 #include "third_party/WebKit/public/platform/WebRTCDataChannelInit.h"
13 #include "third_party/WebKit/public/platform/WebString.h"
14
15 namespace WebTestRunner {
16
17 class WebTestDelegate;
18
19 class MockWebRTCDataChannelHandler : public blink::WebRTCDataChannelHandler, pub lic blink::WebNonCopyable {
20 public:
21 MockWebRTCDataChannelHandler(blink::WebString label, const blink::WebRTCData ChannelInit&, WebTestDelegate*);
22
23 virtual void setClient(blink::WebRTCDataChannelHandlerClient*) OVERRIDE;
24 virtual blink::WebString label() OVERRIDE { return m_label; }
25 virtual bool isReliable() OVERRIDE { return m_reliable; }
26 virtual bool ordered() const OVERRIDE;
27 virtual unsigned short maxRetransmitTime() const OVERRIDE;
28 virtual unsigned short maxRetransmits() const OVERRIDE;
29 virtual blink::WebString protocol() const OVERRIDE;
30 virtual bool negotiated() const OVERRIDE;
31 virtual unsigned short id() const OVERRIDE;
32 virtual unsigned long bufferedAmount() OVERRIDE;
33 virtual bool sendStringData(const blink::WebString&) OVERRIDE;
34 virtual bool sendRawData(const char*, size_t) OVERRIDE;
35 virtual void close() OVERRIDE;
36
37 // WebTask related methods
38 WebTaskList* taskList() { return &m_taskList; }
39
40 private:
41 MockWebRTCDataChannelHandler();
42
43 blink::WebRTCDataChannelHandlerClient* m_client;
44 blink::WebString m_label;
45 blink::WebRTCDataChannelInit m_init;
46 bool m_reliable;
47 WebTaskList m_taskList;
48 WebTestDelegate* m_delegate;
49 };
50
51 }
52
53 #endif // MockWebRTCDataChannelHandler_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698