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

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/RTCDataChannelTest.cpp

Issue 1845323002: Remove WebUnitTestSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "modules/mediastream/RTCDataChannel.h" 5 #include "modules/mediastream/RTCDataChannel.h"
6 6
7 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 7 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
8 #include "core/dom/DOMArrayBuffer.h" 8 #include "core/dom/DOMArrayBuffer.h"
9 #include "core/dom/DOMException.h" 9 #include "core/dom/DOMException.h"
10 #include "core/dom/ExceptionCode.h" 10 #include "core/dom/ExceptionCode.h"
11 #include "core/events/Event.h" 11 #include "core/events/Event.h"
12 #include "platform/heap/Heap.h" 12 #include "platform/heap/Heap.h"
13 #include "public/platform/WebRTCDataChannelHandler.h" 13 #include "public/platform/WebRTCDataChannelHandler.h"
14 #include "public/platform/WebUnitTestSupport.h"
15 #include "public/platform/WebVector.h" 14 #include "public/platform/WebVector.h"
16 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
17 #include "wtf/RefPtr.h" 16 #include "wtf/RefPtr.h"
18 #include "wtf/text/WTFString.h" 17 #include "wtf/text/WTFString.h"
19 18
20 namespace blink { 19 namespace blink {
21 namespace { 20 namespace {
22 21
23 class MockHandler final : public WebRTCDataChannelHandler { 22 class MockHandler final : public WebRTCDataChannelHandler {
24 public: 23 public:
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 channel->setBufferedAmountLowThreshold(97U); 136 channel->setBufferedAmountLowThreshold(97U);
138 EXPECT_EQ(4U, channel->m_scheduledEvents.size()); // No new events. 137 EXPECT_EQ(4U, channel->m_scheduledEvents.size()); // No new events.
139 138
140 handler->drainBuffer(1); 139 handler->drainBuffer(1);
141 EXPECT_EQ(97U, channel->bufferedAmount()); 140 EXPECT_EQ(97U, channel->bufferedAmount());
142 EXPECT_EQ(5U, channel->m_scheduledEvents.size()); // New event. 141 EXPECT_EQ(5U, channel->m_scheduledEvents.size()); // New event.
143 EXPECT_EQ("bufferedamountlow", std::string(channel->m_scheduledEvents.last() ->type().utf8().data())); 142 EXPECT_EQ("bufferedamountlow", std::string(channel->m_scheduledEvents.last() ->type().utf8().data()));
144 } 143 }
145 144
146 } // namespace blink 145 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698