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

Side by Side Diff: LayoutTests/http/tests/websocket/deflate-frame-set-bfinal.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 receiving compressed frames with BFINAL = 1.");
11
12 window.jsTestIsAsync = true;
13
14 var closeEvent;
15 var ws;
16 var messageIndex;
17
18 var messages = [
19 "Hello",
20 "World",
21 "Goodbye"
22 ];
23
24 ws = new WebSocket("ws://localhost:8880/deflate-frame?set_bfinal");
25
26 ws.onopen = function(event)
27 {
28 messageIndex = 0;
29 debug("Sending message: \"" + messages[messageIndex] + "\"");
30 ws.send(messages[messageIndex]);
31 };
32
33 ws.onmessage = function(event)
34 {
35 shouldBe("event.data", "'" + messages[messageIndex] + "'");
36 if (messageIndex === messages.length - 1)
37 ws.close();
38 else {
39 messageIndex += 1;
40 debug("Sending message: \"" + messages[messageIndex] + "\"");
41 ws.send(messages[messageIndex]);
42 }
43 };
44
45 ws.onclose = function(event)
46 {
47 debug("onclose() was called.");
48 closeEvent = event;
49 shouldBeTrue("closeEvent.wasClean");
50 finishJSTest();
51 };
52
53 </script>
54 </body>
55 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698