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

Side by Side Diff: LayoutTests/http/tests/websocket/deflate-frame-comp-bit-onoff.html

Issue 706573003: [WebSocket] Remove layout tests about deflate-frame extension (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed #5 Created 6 years, 1 month 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 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script src="/js-test-resources/js-test.js"></script>
5 </head>
6 <body>
7 <div id="description"></div>
8 <div id="console"></div>
9 <script>
10 description("Test compression enabled/disabled frame receiving.");
11
12 window.jsTestIsAsync = true;
13
14 var closeEvent;
15 var ws;
16 var messageIndex;
17
18 var messages = [
19 "Hello",
20 "DisableCompression", // This disables compression
21 "World",
22 "EnableCompression", // This enables compression
23 "Goodbye"
24 ];
25
26 ws = new WebSocket("ws://localhost:8880/deflate-frame");
27
28 ws.onopen = function(event)
29 {
30 messageIndex = 0;
31 debug("Sending message: \"" + messages[messageIndex] + "\"");
32 ws.send(messages[messageIndex]);
33 };
34
35 ws.onmessage = function(event)
36 {
37 shouldBe("event.data", "'" + messages[messageIndex] + "'");
38 if (messageIndex === messages.length - 1)
39 ws.close();
40 else {
41 messageIndex += 1;
42 debug("Sending message: \"" + messages[messageIndex] + "\"");
43 ws.send(messages[messageIndex]);
44 }
45 };
46
47 ws.onclose = function(event)
48 {
49 debug("onclose() was called.");
50 closeEvent = event;
51 shouldBeTrue("closeEvent.wasClean");
52 finishJSTest();
53 };
54
55 </script>
56 </body>
57 </html>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/http/tests/websocket/deflate-frame-comp-bit-onoff-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698