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

Side by Side Diff: content/test/layout_tests/runner/MockWebRTCDTMFSenderHandler.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 /*
6 * Copyright (C) 2013 Google Inc. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR
21 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
25 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30 #ifndef MockWebRTCDTMFSenderHandler_h
31 #define MockWebRTCDTMFSenderHandler_h
32
33 #include "content/public/test/layout_tests/WebTask.h"
34 #include "content/test/layout_tests/runner/TestCommon.h"
35 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
36 #include "third_party/WebKit/public/platform/WebNonCopyable.h"
37 #include "third_party/WebKit/public/platform/WebRTCDTMFSenderHandler.h"
38 #include "third_party/WebKit/public/platform/WebString.h"
39
40 namespace WebTestRunner {
41
42 class WebTestDelegate;
43
44 class MockWebRTCDTMFSenderHandler : public blink::WebRTCDTMFSenderHandler, publi c blink::WebNonCopyable {
45 public:
46 MockWebRTCDTMFSenderHandler(const blink::WebMediaStreamTrack&, WebTestDelega te*);
47
48 virtual void setClient(blink::WebRTCDTMFSenderHandlerClient*) OVERRIDE;
49
50 virtual blink::WebString currentToneBuffer() OVERRIDE;
51
52 virtual bool canInsertDTMF() OVERRIDE;
53 virtual bool insertDTMF(const blink::WebString& tones, long duration, long i nterToneGap) OVERRIDE;
54
55 // WebTask related methods
56 WebTaskList* taskList() { return &m_taskList; }
57 void clearToneBuffer() { m_toneBuffer.reset(); }
58
59 private:
60 MockWebRTCDTMFSenderHandler();
61
62 blink::WebRTCDTMFSenderHandlerClient* m_client;
63 blink::WebMediaStreamTrack m_track;
64 blink::WebString m_toneBuffer;
65 WebTaskList m_taskList;
66 WebTestDelegate* m_delegate;
67 };
68
69 }
70
71 #endif // MockWebRTCDTMFSenderHandler_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698