OLD | NEW |
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 <stddef.h> |
| 6 |
5 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
6 #include "base/test/test_simple_task_runner.h" | 8 #include "base/test/test_simple_task_runner.h" |
7 #include "content/renderer/media/mock_data_channel_impl.h" | 9 #include "content/renderer/media/mock_data_channel_impl.h" |
8 #include "content/renderer/media/rtc_data_channel_handler.h" | 10 #include "content/renderer/media/rtc_data_channel_handler.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "third_party/WebKit/public/platform/WebRTCDataChannelHandlerClient.h" | 12 #include "third_party/WebKit/public/platform/WebRTCDataChannelHandlerClient.h" |
11 | 13 |
12 namespace content { | 14 namespace content { |
13 | 15 |
14 class MockDataChannelHandlerClient : | 16 class MockDataChannelHandlerClient : |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // Check that state() returns the expected value when the channel opens early. | 74 // Check that state() returns the expected value when the channel opens early. |
73 TEST_F(RtcDataChannelHandlerTest, StateEarlyOpen) { | 75 TEST_F(RtcDataChannelHandlerTest, StateEarlyOpen) { |
74 channel_->changeState(webrtc::DataChannelInterface::kOpen); | 76 channel_->changeState(webrtc::DataChannelInterface::kOpen); |
75 signaling_thread_->RunPendingTasks(); | 77 signaling_thread_->RunPendingTasks(); |
76 handler_.reset(new RtcDataChannelHandler(signaling_thread_, channel_.get())); | 78 handler_.reset(new RtcDataChannelHandler(signaling_thread_, channel_.get())); |
77 EXPECT_EQ(MockDataChannelHandlerClient::ReadyStateOpen, | 79 EXPECT_EQ(MockDataChannelHandlerClient::ReadyStateOpen, |
78 handler_->state()); | 80 handler_->state()); |
79 } | 81 } |
80 | 82 |
81 } // namespace content | 83 } // namespace content |
OLD | NEW |