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

Side by Side Diff: LayoutTests/http/tests/websocket/tests/hybi/cross-origin.html

Issue 101143002: Remove hybi sub directory for WebSocket layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 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 Cross Origin test");
11
12 window.jsTestIsAsync = true;
13
14 var origin;
15
16 function endTest()
17 {
18 shouldBe("origin", '"http://127.0.0.1:8000"');
19 clearTimeout(timeoutID);
20 finishJSTest();
21 }
22
23 var url = "ws://localhost:8880/origin-test";
24 debug("document.domain=" + document.domain);
25 debug("ws.url=" + url);
26 var ws = new WebSocket(url);
27
28 ws.onopen = function()
29 {
30 debug("Connected");
31 };
32
33 ws.onmessage = function (messageEvent)
34 {
35 origin = messageEvent.data;
36 ws.close();
37 };
38
39 ws.onclose = function()
40 {
41 endTest();
42 };
43
44 function timeOutCallback()
45 {
46 debug("Timed out in state: " + ws.readyState);
47 endTest();
48 }
49
50 var timeoutID = setTimeout(timeOutCallback, 3000);
51
52 </script>
53 </body>
54 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698