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

Unified Diff: LayoutTests/http/tests/websocket/tests/hybi/workers/resources/worker-simple.js

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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/websocket/tests/hybi/workers/resources/worker-simple.js
diff --git a/LayoutTests/http/tests/websocket/tests/hybi/workers/resources/worker-simple.js b/LayoutTests/http/tests/websocket/tests/hybi/workers/resources/worker-simple.js
deleted file mode 100644
index f60de5e02c3c77bc99404c8c1bc7f1f350e85e4b..0000000000000000000000000000000000000000
--- a/LayoutTests/http/tests/websocket/tests/hybi/workers/resources/worker-simple.js
+++ /dev/null
@@ -1,42 +0,0 @@
-if (self.postMessage)
- runTests();
-else
- onconnect = handleConnect;
-
-function handleConnect(event)
-{
- // For shared workers, create a faux postMessage() API to send message back to the parent page.
- self.postMessage = function (message) { event.ports[0].postMessage(message); };
- runTests();
-};
-
-function runTests()
-{
- var ws;
- try {
- postMessage("PASS: worker: init");
- if ('WebSocket' in self)
- postMessage("PASS: worker: WebSocket exists");
- else
- postMessage("PASS: worker: no WebSocket");
- ws = new WebSocket('ws://localhost:8880/workers/resources/simple');
- ws.onopen = function() {
- postMessage("PASS: worker: Connected.");
- };
- ws.onmessage = function(evt) {
- postMessage("PASS: worker: Received: '" + evt.data + "'");
- };
- ws.onclose = function(closeEvent) {
- postMessage("PASS: worker: Closed.");
- if (closeEvent.wasClean === true)
- postMessage("PASS: worker: closeEvent.wasClean is true.");
- else
- postMessage("FAIL: worker: closeEvent.wasClean should be true but was \"" + closeEvent.wasClean + "\".");
- postMessage("DONE");
- };
- } catch (e) {
- postMessage("FAIL: worker: Unexpected exception: " + e);
- } finally {
- postMessage("PASS: worker: successfullyParsed:" + ws);
- }
-};

Powered by Google App Engine
This is Rietveld 408576698