| 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 "platform/scheduler/renderer/web_view_scheduler.h" | 6 #include "platform/scheduler/renderer/web_view_scheduler.h" |
| 6 #include "platform/testing/TestingPlatformSupport.h" | 7 #include "platform/testing/TestingPlatformSupport.h" |
| 7 #include "public/platform/WebRTCError.h" | 8 #include "public/platform/WebRTCError.h" |
| 8 #include "public/platform/WebRTCPeerConnectionHandler.h" | 9 #include "public/platform/WebRTCPeerConnectionHandler.h" |
| 9 #include "public/platform/WebRTCRtpReceiver.h" | 10 #include "public/platform/WebRTCRtpReceiver.h" |
| 10 #include "public/platform/WebRTCSessionDescription.h" | 11 #include "public/platform/WebRTCSessionDescription.h" |
| 11 #include "public/web/WebScriptSource.h" | 12 #include "public/web/WebScriptSource.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include "web/WebLocalFrameImpl.h" | 14 #include "web/WebLocalFrameImpl.h" |
| 14 #include "web/WebViewImpl.h" | |
| 15 #include "web/tests/sim/SimRequest.h" | 15 #include "web/tests/sim/SimRequest.h" |
| 16 #include "web/tests/sim/SimTest.h" | 16 #include "web/tests/sim/SimTest.h" |
| 17 | 17 |
| 18 using testing::_; | 18 using testing::_; |
| 19 | 19 |
| 20 namespace blink { | 20 namespace blink { |
| 21 | 21 |
| 22 class ActiveConnectionThrottlingTest : public SimTest {}; | 22 class ActiveConnectionThrottlingTest : public SimTest {}; |
| 23 | 23 |
| 24 TEST_F(ActiveConnectionThrottlingTest, WebSocketStopsThrottling) { | 24 TEST_F(ActiveConnectionThrottlingTest, WebSocketStopsThrottling) { |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 "</script>)"); | 120 "</script>)"); |
| 121 | 121 |
| 122 EXPECT_TRUE(WebView().Scheduler()->HasActiveConnectionForTest()); | 122 EXPECT_TRUE(WebView().Scheduler()->HasActiveConnectionForTest()); |
| 123 | 123 |
| 124 MainFrame().ExecuteScript(WebString("data_channel.close();")); | 124 MainFrame().ExecuteScript(WebString("data_channel.close();")); |
| 125 | 125 |
| 126 EXPECT_FALSE(WebView().Scheduler()->HasActiveConnectionForTest()); | 126 EXPECT_FALSE(WebView().Scheduler()->HasActiveConnectionForTest()); |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace blink | 129 } // namespace blink |
| OLD | NEW |