OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code if governed by a BSD-style license that can be | 2 // Use of this source code if governed by a BSD-style license that can be |
3 // found in LICENSE file. | 3 // found in LICENSE file. |
4 | 4 |
5 #include "core/exported/WebViewBase.h" | 5 #include "core/exported/WebViewBase.h" |
| 6 #include "core/frame/WebLocalFrameBase.h" |
6 #include "platform/scheduler/renderer/web_view_scheduler.h" | 7 #include "platform/scheduler/renderer/web_view_scheduler.h" |
7 #include "platform/testing/TestingPlatformSupport.h" | 8 #include "platform/testing/TestingPlatformSupport.h" |
8 #include "platform/wtf/PtrUtil.h" | 9 #include "platform/wtf/PtrUtil.h" |
9 #include "public/platform/WebRTCError.h" | 10 #include "public/platform/WebRTCError.h" |
10 #include "public/platform/WebRTCPeerConnectionHandler.h" | 11 #include "public/platform/WebRTCPeerConnectionHandler.h" |
11 #include "public/platform/WebRTCRtpReceiver.h" | 12 #include "public/platform/WebRTCRtpReceiver.h" |
12 #include "public/platform/WebRTCRtpSender.h" | 13 #include "public/platform/WebRTCRtpSender.h" |
13 #include "public/platform/WebRTCSessionDescription.h" | 14 #include "public/platform/WebRTCSessionDescription.h" |
14 #include "public/web/WebScriptSource.h" | 15 #include "public/web/WebScriptSource.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "web/WebLocalFrameImpl.h" | |
17 #include "web/tests/sim/SimRequest.h" | 17 #include "web/tests/sim/SimRequest.h" |
18 #include "web/tests/sim/SimTest.h" | 18 #include "web/tests/sim/SimTest.h" |
19 | 19 |
20 using testing::_; | 20 using testing::_; |
21 | 21 |
22 namespace blink { | 22 namespace blink { |
23 | 23 |
24 class ActiveConnectionThrottlingTest : public SimTest {}; | 24 class ActiveConnectionThrottlingTest : public SimTest {}; |
25 | 25 |
26 TEST_F(ActiveConnectionThrottlingTest, WebSocketStopsThrottling) { | 26 TEST_F(ActiveConnectionThrottlingTest, WebSocketStopsThrottling) { |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 "</script>)"); | 127 "</script>)"); |
128 | 128 |
129 EXPECT_TRUE(WebView().Scheduler()->HasActiveConnectionForTest()); | 129 EXPECT_TRUE(WebView().Scheduler()->HasActiveConnectionForTest()); |
130 | 130 |
131 MainFrame().ExecuteScript(WebString("data_channel.close();")); | 131 MainFrame().ExecuteScript(WebString("data_channel.close();")); |
132 | 132 |
133 EXPECT_FALSE(WebView().Scheduler()->HasActiveConnectionForTest()); | 133 EXPECT_FALSE(WebView().Scheduler()->HasActiveConnectionForTest()); |
134 } | 134 } |
135 | 135 |
136 } // namespace blink | 136 } // namespace blink |
OLD | NEW |