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

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

Issue 2652973002: [scheduler] Plumb websocket information to scheduler (Closed)
Patch Set: Addressed comments & added simtest 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");
Sami 2017/02/08 17:26:58 In the other tests we needed to webView().settings
altimin 2017/02/08 17:32:13 I'm not 100% sure, but it seems so. (This test fai
19
20 loadURL("https://example.com/");
21 mainResource.complete(
22 "(<script>"
23 " var socket = new WebSocket(\"ws://www.example.com/websocket\");"
24 "</script>)");
25
26 EXPECT_TRUE(webView().scheduler()->hasActiveConnectionForTest());
Sami 2017/02/08 17:26:58 Please also check this is false before loading any
altimin 2017/02/08 17:32:13 Done.
27 }
28
29 } // 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