Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / websocket / unicode.html
blob25b41a91f065bd7638a2aa88a0fac80286bfdc1f
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("WebSocket unicode message test");
12 window.jsTestIsAsync = true;
14 function endTest()
16 clearTimeout(timeoutID);
17 finishJSTest();
20 var ws = new WebSocket("ws://localhost:8880/unicode");
22 // Hello in Japanese
23 var UNICODE_HELLO = "\u3053\u3093\u306b\u3061\u306f";
24 // Goodbye in Japanese
25 var UNICODE_GOODBYE = "\u3055\u3088\u3046\u306a\u3089";
27 // data needs to be global to be accessbile from shouldBe().
28 var data = "";
30 ws.onopen = function()
32 debug("Connected.");
33 debug("Send UNICODE_HELLO.");
34 ws.send(UNICODE_HELLO);
37 ws.onmessage = function(messageEvent)
39 // The server should send back Goodbye if it receives Hello.
40 data = messageEvent.data;
41 shouldBe("data", "UNICODE_GOODBYE");
44 ws.onclose = function()
46 debug("Closed.");
47 endTest();
50 function timeOutCallback()
52 testFailed("Timed out in state: " + ws.readyState);
53 endTest();
56 var timeoutID = setTimeout(timeOutCallback, 3000);
58 </script>
59 </body>
60 </html>