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

Side by Side Diff: third_party/WebKit/Source/web/tests/ActiveConnectionThrottlingTest.cpp

Issue 2652973002: [scheduler] Plumb websocket information to scheduler (Closed)
Patch Set: git Created 3 years, 10 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
(Empty)
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
3 // found in LICENSE file.
4
5 #include "testing/gtest/include/gtest/gtest.h"
6 #include "third_party/WebKit/public/platform/WebViewScheduler.h"
7 #include "web/WebViewImpl.h"
8 #include "web/tests/sim/SimRequest.h"
9 #include "web/tests/sim/SimTest.h"
10
11 using testing::_;
12
13 namespace blink {
14
15 class ActiveConnectionThrottlingTest : public SimTest {};
16
17 TEST_F(ActiveConnectionThrottlingTest, WebSocketStopsThrottling) {
18 SimRequest mainResource("https://example.com/", "text/html");
19
20 loadURL("https://example.com/");
21
22 EXPECT_FALSE(webView().scheduler()->hasActiveConnectionForTest());
23
24 mainResource.complete(
25 "(<script>"
26 " var socket = new WebSocket(\"ws://www.example.com/websocket\");"
27 "</script>)");
28
29 EXPECT_TRUE(webView().scheduler()->hasActiveConnectionForTest());
30 }
31
32 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/BUILD.gn ('k') | third_party/WebKit/public/platform/WebViewScheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698