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

Side by Side Diff: LayoutTests/http/tests/websocket/pong-only.html

Issue 788923007: Layout test to verify pong message from the server. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 <script src="/js-test-resources/js-test.js"></script>
3 <script>
4 description("Test whether WebSocket correctly ignores a pong message with a payl oad");
5
6 window.jsTestIsAsync = true;
7
8 var url = "ws://localhost:8880/pong-only";
9 var ws = new WebSocket(url);
10 var wasClean;
11 var message;
tyoshino (SeeGerritForStatus) 2015/01/05 05:19:45 let's declare these variables right above each han
Adam Rice 2015/01/05 20:24:32 Done.
12
13 ws.onmessage = function(event)
14 {
15 message = event.data;
16 shouldBeEqualToString("message", "sent pong");
17 ws.close();
18 };
19
20 ws.onclose = function(event)
21 {
22 wasClean = event.wasClean;
23 shouldBeTrue("wasClean");
24 finishJSTest();
25 };
26
27 </script>
28
tyoshino (SeeGerritForStatus) 2015/01/05 05:19:45 remove blank line?
Adam Rice 2015/01/05 20:24:32 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698