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

Side by Side Diff: LayoutTests/http/tests/websocket/handshake-fail-by-no-cr.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 PUBLIC "-//IETF//DTD HTML//EN">
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 type="text/javascript">
10 description('Handshake should fail when the first line does not end with CRLF.') ;
11
12 window.jsTestIsAsync = true;
13
14 var connected = false;
15 var origin;
16
17 function endTest() {
18 shouldBeFalse('connected');
19 shouldBeUndefined('origin');
20 clearTimeout(timeoutID);
21 finishJSTest();
22 }
23
24 var url = 'ws://localhost:8880/handshake-fail-by-no-cr';
25 var ws = new WebSocket(url);
26
27 ws.onopen = function()
28 {
29 debug('Connected');
30 connected = true;
31 }
32
33 ws.onmessage = function(messageEvent)
34 {
35 origin = messageEvent.data;
36 debug('origin = ' + origin);
37 ws.close();
38 }
39
40 ws.onclose = function()
41 {
42 endTest();
43 }
44
45 function timeoutCallback()
46 {
47 debug('Timed out (state = ' + ws.readyState + ')');
48 endTest();
49 }
50
51 var timeoutID = setTimeout(timeoutCallback, 3000);
52
53 </script>
54 </body>
55 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698