Bug 1456463 [wpt PR 10598] - Convert WebSocket tests to .any.js format, a=testonly
authorAnne van Kesteren <annevk@annevk.nl>
Tue, 01 May 2018 14:19:18 +0000
changeset 472630 1e379aba0d93b62931a9cd2426634229853573a5
parent 472629 6f706f86c0fc2cc81bea4c8859424ba6c73a68b3
child 472631 908202ad7710db771f8d1331e271c659e81db4d6
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1456463, 10598
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1456463 [wpt PR 10598] - Convert WebSocket tests to .any.js format, a=testonly Automatic update from web-platform-testsConvert WebSocket tests to .any.js format (#10598) Take 2 (see #5148 for take 1), fixes #2557. -- wpt-commits: 28b62c1c17ac678ea2c21bf09fafe346731c0fca wpt-pr: 10598
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/websockets/Close-1000-reason.any.js
testing/web-platform/tests/websockets/Close-1000-reason.htm
testing/web-platform/tests/websockets/Close-1000.any.js
testing/web-platform/tests/websockets/Close-1000.htm
testing/web-platform/tests/websockets/Close-Reason-124Bytes.any.js
testing/web-platform/tests/websockets/Close-Reason-124Bytes.htm
testing/web-platform/tests/websockets/Close-reason-unpaired-surrogates.any.js
testing/web-platform/tests/websockets/Close-reason-unpaired-surrogates.htm
testing/web-platform/tests/websockets/Close-undefined.any.js
testing/web-platform/tests/websockets/Close-undefined.htm
testing/web-platform/tests/websockets/Create-Secure-extensions-empty.any.js
testing/web-platform/tests/websockets/Create-Secure-extensions-empty.htm
testing/web-platform/tests/websockets/Create-Secure-url-with-space.any.js
testing/web-platform/tests/websockets/Create-Secure-url-with-space.htm
testing/web-platform/tests/websockets/Create-Secure-valid-url-array-protocols.any.js
testing/web-platform/tests/websockets/Create-Secure-valid-url-array-protocols.htm
testing/web-platform/tests/websockets/Create-Secure-valid-url-binaryType-blob.any.js
testing/web-platform/tests/websockets/Create-Secure-valid-url-binaryType-blob.htm
testing/web-platform/tests/websockets/Create-Secure-valid-url-protocol-setCorrectly.any.js
testing/web-platform/tests/websockets/Create-Secure-valid-url-protocol-setCorrectly.htm
testing/web-platform/tests/websockets/Create-Secure-valid-url-protocol-string.any.js
testing/web-platform/tests/websockets/Create-Secure-valid-url-protocol-string.htm
testing/web-platform/tests/websockets/Create-Secure-valid-url.any.js
testing/web-platform/tests/websockets/Create-Secure-valid-url.htm
testing/web-platform/tests/websockets/Create-Secure-verify-url-set-non-default-port.any.js
testing/web-platform/tests/websockets/Create-Secure-verify-url-set-non-default-port.htm
testing/web-platform/tests/websockets/Create-asciiSep-protocol-string.any.js
testing/web-platform/tests/websockets/Create-asciiSep-protocol-string.htm
testing/web-platform/tests/websockets/Create-blocked-port.any.js
testing/web-platform/tests/websockets/Create-blocked-port.htm
testing/web-platform/tests/websockets/Create-invalid-urls.any.js
testing/web-platform/tests/websockets/Create-invalid-urls.htm
testing/web-platform/tests/websockets/Create-non-absolute-url.any.js
testing/web-platform/tests/websockets/Create-non-absolute-url.htm
testing/web-platform/tests/websockets/Create-nonAscii-protocol-string.any.js
testing/web-platform/tests/websockets/Create-nonAscii-protocol-string.htm
testing/web-platform/tests/websockets/Create-on-worker-shutdown.any.js
testing/web-platform/tests/websockets/Create-on-worker-shutdown.html
testing/web-platform/tests/websockets/Create-protocol-with-space.any.js
testing/web-platform/tests/websockets/Create-protocol-with-space.htm
testing/web-platform/tests/websockets/Create-protocols-repeated-case-insensitive.any.js
testing/web-platform/tests/websockets/Create-protocols-repeated-case-insensitive.htm
testing/web-platform/tests/websockets/Create-protocols-repeated.any.js
testing/web-platform/tests/websockets/Create-protocols-repeated.htm
testing/web-platform/tests/websockets/Create-valid-url-array-protocols.any.js
testing/web-platform/tests/websockets/Create-valid-url-array-protocols.htm
testing/web-platform/tests/websockets/Create-valid-url-protocol-empty.any.js
testing/web-platform/tests/websockets/Create-valid-url-protocol-empty.htm
testing/web-platform/tests/websockets/Create-valid-url-protocol.any.js
testing/web-platform/tests/websockets/Create-valid-url-protocol.htm
testing/web-platform/tests/websockets/Create-valid-url.any.js
testing/web-platform/tests/websockets/Create-valid-url.htm
testing/web-platform/tests/websockets/Create-verify-url-set-non-default-port.any.js
testing/web-platform/tests/websockets/Create-verify-url-set-non-default-port.htm
testing/web-platform/tests/websockets/Create-wrong-scheme.any.js
testing/web-platform/tests/websockets/Create-wrong-scheme.htm
testing/web-platform/tests/websockets/Secure-Close-1000-reason.any.js
testing/web-platform/tests/websockets/Secure-Close-1000-reason.htm
testing/web-platform/tests/websockets/Secure-Close-1000-verify-code.any.js
testing/web-platform/tests/websockets/Secure-Close-1000-verify-code.htm
testing/web-platform/tests/websockets/Secure-Close-1000.any.js
testing/web-platform/tests/websockets/Secure-Close-1000.htm
testing/web-platform/tests/websockets/Secure-Close-1005-verify-code.any.js
testing/web-platform/tests/websockets/Secure-Close-1005-verify-code.htm
testing/web-platform/tests/websockets/Secure-Close-1005.any.js
testing/web-platform/tests/websockets/Secure-Close-1005.htm
testing/web-platform/tests/websockets/Secure-Close-2999-reason.any.js
testing/web-platform/tests/websockets/Secure-Close-2999-reason.htm
testing/web-platform/tests/websockets/Secure-Close-3000-reason.any.js
testing/web-platform/tests/websockets/Secure-Close-3000-reason.htm
testing/web-platform/tests/websockets/Secure-Close-3000-verify-code.any.js
testing/web-platform/tests/websockets/Secure-Close-3000-verify-code.htm
testing/web-platform/tests/websockets/Secure-Close-4999-reason.any.js
testing/web-platform/tests/websockets/Secure-Close-4999-reason.htm
testing/web-platform/tests/websockets/Secure-Close-Reason-124Bytes.any.js
testing/web-platform/tests/websockets/Secure-Close-Reason-124Bytes.htm
testing/web-platform/tests/websockets/Secure-Close-Reason-Unpaired-surrogates.any.js
testing/web-platform/tests/websockets/Secure-Close-Reason-Unpaired-surrogates.htm
testing/web-platform/tests/websockets/Secure-Close-onlyReason.any.js
testing/web-platform/tests/websockets/Secure-Close-onlyReason.htm
testing/web-platform/tests/websockets/Secure-Close-readyState-Closed.any.js
testing/web-platform/tests/websockets/Secure-Close-readyState-Closed.htm
testing/web-platform/tests/websockets/Secure-Close-readyState-Closing.any.js
testing/web-platform/tests/websockets/Secure-Close-readyState-Closing.htm
testing/web-platform/tests/websockets/Secure-Close-server-initiated-close.any.js
testing/web-platform/tests/websockets/Secure-Close-server-initiated-close.htm
testing/web-platform/tests/websockets/Secure-Close-undefined.any.js
testing/web-platform/tests/websockets/Secure-Close-undefined.htm
testing/web-platform/tests/websockets/Secure-Send-65K-data.any.js
testing/web-platform/tests/websockets/Secure-Send-65K-data.htm
testing/web-platform/tests/websockets/Secure-Send-binary-65K-arraybuffer.any.js
testing/web-platform/tests/websockets/Secure-Send-binary-65K-arraybuffer.htm
testing/web-platform/tests/websockets/Secure-Send-binary-arraybuffer.any.js
testing/web-platform/tests/websockets/Secure-Send-binary-arraybuffer.htm
testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-float32.any.js
testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-float32.htm
testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-float64.any.js
testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-float64.htm
testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-int32.any.js
testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-int32.htm
testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint16-offset-length.any.js
testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint16-offset-length.htm
testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint32-offset.any.js
testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint32-offset.htm
testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint8-offset-length.any.js
testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint8-offset-length.htm
testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint8-offset.any.js
testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint8-offset.htm
testing/web-platform/tests/websockets/Secure-Send-binary-blob.any.js
testing/web-platform/tests/websockets/Secure-Send-binary-blob.htm
testing/web-platform/tests/websockets/Secure-Send-data.any.js
testing/web-platform/tests/websockets/Secure-Send-data.htm
testing/web-platform/tests/websockets/Secure-Send-null.any.js
testing/web-platform/tests/websockets/Secure-Send-null.htm
testing/web-platform/tests/websockets/Secure-Send-paired-surrogates.any.js
testing/web-platform/tests/websockets/Secure-Send-paired-surrogates.htm
testing/web-platform/tests/websockets/Secure-Send-unicode-data.any.js
testing/web-platform/tests/websockets/Secure-Send-unicode-data.htm
testing/web-platform/tests/websockets/Secure-Send-unpaired-surrogates.any.js
testing/web-platform/tests/websockets/Secure-Send-unpaired-surrogates.htm
testing/web-platform/tests/websockets/Send-0byte-data.any.js
testing/web-platform/tests/websockets/Send-0byte-data.htm
testing/web-platform/tests/websockets/Send-65K-data.any.js
testing/web-platform/tests/websockets/Send-65K-data.htm
testing/web-platform/tests/websockets/Send-Unpaired-Surrogates.any.js
testing/web-platform/tests/websockets/Send-Unpaired-Surrogates.htm
testing/web-platform/tests/websockets/Send-before-open.any.js
testing/web-platform/tests/websockets/Send-before-open.htm
testing/web-platform/tests/websockets/Send-binary-65K-arraybuffer.any.js
testing/web-platform/tests/websockets/Send-binary-65K-arraybuffer.htm
testing/web-platform/tests/websockets/Send-binary-arraybuffer.any.js
testing/web-platform/tests/websockets/Send-binary-arraybuffer.htm
testing/web-platform/tests/websockets/Send-binary-arraybufferview-int16-offset.any.js
testing/web-platform/tests/websockets/Send-binary-arraybufferview-int16-offset.htm
testing/web-platform/tests/websockets/Send-binary-arraybufferview-int8.any.js
testing/web-platform/tests/websockets/Send-binary-arraybufferview-int8.htm
testing/web-platform/tests/websockets/Send-binary-blob.any.js
testing/web-platform/tests/websockets/Send-binary-blob.htm
testing/web-platform/tests/websockets/Send-data.any.js
testing/web-platform/tests/websockets/Send-data.htm
testing/web-platform/tests/websockets/Send-null.any.js
testing/web-platform/tests/websockets/Send-null.htm
testing/web-platform/tests/websockets/Send-paired-surrogates.any.js
testing/web-platform/tests/websockets/Send-paired-surrogates.htm
testing/web-platform/tests/websockets/Send-unicode-data.any.js
testing/web-platform/tests/websockets/Send-unicode-data.htm
testing/web-platform/tests/websockets/binaryType-wrong-value.any.js
testing/web-platform/tests/websockets/binaryType-wrong-value.htm
testing/web-platform/tests/websockets/constructor.any.js
testing/web-platform/tests/websockets/constructor.html
testing/web-platform/tests/websockets/eventhandlers.any.js
testing/web-platform/tests/websockets/eventhandlers.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -370227,457 +370227,749 @@
     ]
    ],
    "webrtc/simplecall.https.html": [
     [
      "/webrtc/simplecall.https.html",
      {}
     ]
    ],
-   "websockets/Close-1000-reason.htm": [
-    [
-     "/websockets/Close-1000-reason.htm",
-     {}
-    ]
-   ],
-   "websockets/Close-1000.htm": [
-    [
-     "/websockets/Close-1000.htm",
-     {}
-    ]
-   ],
-   "websockets/Close-Reason-124Bytes.htm": [
-    [
-     "/websockets/Close-Reason-124Bytes.htm",
-     {}
-    ]
-   ],
-   "websockets/Close-reason-unpaired-surrogates.htm": [
-    [
-     "/websockets/Close-reason-unpaired-surrogates.htm",
-     {}
-    ]
-   ],
-   "websockets/Close-undefined.htm": [
-    [
-     "/websockets/Close-undefined.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-Secure-extensions-empty.htm": [
-    [
-     "/websockets/Create-Secure-extensions-empty.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-Secure-url-with-space.htm": [
-    [
-     "/websockets/Create-Secure-url-with-space.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-Secure-valid-url-array-protocols.htm": [
-    [
-     "/websockets/Create-Secure-valid-url-array-protocols.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-Secure-valid-url-binaryType-blob.htm": [
-    [
-     "/websockets/Create-Secure-valid-url-binaryType-blob.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-Secure-valid-url-protocol-setCorrectly.htm": [
-    [
-     "/websockets/Create-Secure-valid-url-protocol-setCorrectly.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-Secure-valid-url-protocol-string.htm": [
-    [
-     "/websockets/Create-Secure-valid-url-protocol-string.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-Secure-valid-url.htm": [
-    [
-     "/websockets/Create-Secure-valid-url.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-Secure-verify-url-set-non-default-port.htm": [
-    [
-     "/websockets/Create-Secure-verify-url-set-non-default-port.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-asciiSep-protocol-string.htm": [
-    [
-     "/websockets/Create-asciiSep-protocol-string.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-blocked-port.htm": [
-    [
-     "/websockets/Create-blocked-port.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-invalid-urls.htm": [
-    [
-     "/websockets/Create-invalid-urls.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-non-absolute-url.htm": [
-    [
-     "/websockets/Create-non-absolute-url.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-nonAscii-protocol-string.htm": [
-    [
-     "/websockets/Create-nonAscii-protocol-string.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-on-worker-shutdown.html": [
-    [
-     "/websockets/Create-on-worker-shutdown.html",
-     {}
-    ]
-   ],
-   "websockets/Create-protocol-with-space.htm": [
-    [
-     "/websockets/Create-protocol-with-space.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-protocols-repeated-case-insensitive.htm": [
-    [
-     "/websockets/Create-protocols-repeated-case-insensitive.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-protocols-repeated.htm": [
-    [
-     "/websockets/Create-protocols-repeated.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-valid-url-array-protocols.htm": [
-    [
-     "/websockets/Create-valid-url-array-protocols.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-valid-url-protocol-empty.htm": [
-    [
-     "/websockets/Create-valid-url-protocol-empty.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-valid-url-protocol.htm": [
-    [
-     "/websockets/Create-valid-url-protocol.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-valid-url.htm": [
-    [
-     "/websockets/Create-valid-url.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-verify-url-set-non-default-port.htm": [
-    [
-     "/websockets/Create-verify-url-set-non-default-port.htm",
-     {}
-    ]
-   ],
-   "websockets/Create-wrong-scheme.htm": [
-    [
-     "/websockets/Create-wrong-scheme.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Close-1000-reason.htm": [
-    [
-     "/websockets/Secure-Close-1000-reason.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Close-1000-verify-code.htm": [
-    [
-     "/websockets/Secure-Close-1000-verify-code.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Close-1000.htm": [
-    [
-     "/websockets/Secure-Close-1000.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Close-1005-verify-code.htm": [
-    [
-     "/websockets/Secure-Close-1005-verify-code.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Close-1005.htm": [
-    [
-     "/websockets/Secure-Close-1005.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Close-2999-reason.htm": [
-    [
-     "/websockets/Secure-Close-2999-reason.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Close-3000-reason.htm": [
-    [
-     "/websockets/Secure-Close-3000-reason.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Close-3000-verify-code.htm": [
-    [
-     "/websockets/Secure-Close-3000-verify-code.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Close-4999-reason.htm": [
-    [
-     "/websockets/Secure-Close-4999-reason.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Close-Reason-124Bytes.htm": [
-    [
-     "/websockets/Secure-Close-Reason-124Bytes.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Close-Reason-Unpaired-surrogates.htm": [
-    [
-     "/websockets/Secure-Close-Reason-Unpaired-surrogates.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Close-onlyReason.htm": [
-    [
-     "/websockets/Secure-Close-onlyReason.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Close-readyState-Closed.htm": [
-    [
-     "/websockets/Secure-Close-readyState-Closed.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Close-readyState-Closing.htm": [
-    [
-     "/websockets/Secure-Close-readyState-Closing.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Close-server-initiated-close.htm": [
-    [
-     "/websockets/Secure-Close-server-initiated-close.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Close-undefined.htm": [
-    [
-     "/websockets/Secure-Close-undefined.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Send-65K-data.htm": [
-    [
-     "/websockets/Secure-Send-65K-data.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Send-binary-65K-arraybuffer.htm": [
-    [
-     "/websockets/Secure-Send-binary-65K-arraybuffer.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Send-binary-arraybuffer.htm": [
-    [
-     "/websockets/Secure-Send-binary-arraybuffer.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Send-binary-arraybufferview-float32.htm": [
-    [
-     "/websockets/Secure-Send-binary-arraybufferview-float32.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Send-binary-arraybufferview-float64.htm": [
-    [
-     "/websockets/Secure-Send-binary-arraybufferview-float64.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Send-binary-arraybufferview-int32.htm": [
-    [
-     "/websockets/Secure-Send-binary-arraybufferview-int32.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Send-binary-arraybufferview-uint16-offset-length.htm": [
-    [
-     "/websockets/Secure-Send-binary-arraybufferview-uint16-offset-length.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Send-binary-arraybufferview-uint32-offset.htm": [
-    [
-     "/websockets/Secure-Send-binary-arraybufferview-uint32-offset.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Send-binary-arraybufferview-uint8-offset-length.htm": [
-    [
-     "/websockets/Secure-Send-binary-arraybufferview-uint8-offset-length.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Send-binary-arraybufferview-uint8-offset.htm": [
-    [
-     "/websockets/Secure-Send-binary-arraybufferview-uint8-offset.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Send-binary-blob.htm": [
-    [
-     "/websockets/Secure-Send-binary-blob.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Send-data.htm": [
-    [
-     "/websockets/Secure-Send-data.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Send-null.htm": [
-    [
-     "/websockets/Secure-Send-null.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Send-paired-surrogates.htm": [
-    [
-     "/websockets/Secure-Send-paired-surrogates.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Send-unicode-data.htm": [
-    [
-     "/websockets/Secure-Send-unicode-data.htm",
-     {}
-    ]
-   ],
-   "websockets/Secure-Send-unpaired-surrogates.htm": [
-    [
-     "/websockets/Secure-Send-unpaired-surrogates.htm",
-     {}
-    ]
-   ],
-   "websockets/Send-0byte-data.htm": [
-    [
-     "/websockets/Send-0byte-data.htm",
-     {}
-    ]
-   ],
-   "websockets/Send-65K-data.htm": [
-    [
-     "/websockets/Send-65K-data.htm",
-     {}
-    ]
-   ],
-   "websockets/Send-Unpaired-Surrogates.htm": [
-    [
-     "/websockets/Send-Unpaired-Surrogates.htm",
-     {}
-    ]
-   ],
-   "websockets/Send-before-open.htm": [
-    [
-     "/websockets/Send-before-open.htm",
-     {}
-    ]
-   ],
-   "websockets/Send-binary-65K-arraybuffer.htm": [
-    [
-     "/websockets/Send-binary-65K-arraybuffer.htm",
-     {}
-    ]
-   ],
-   "websockets/Send-binary-arraybuffer.htm": [
-    [
-     "/websockets/Send-binary-arraybuffer.htm",
-     {}
-    ]
-   ],
-   "websockets/Send-binary-arraybufferview-int16-offset.htm": [
-    [
-     "/websockets/Send-binary-arraybufferview-int16-offset.htm",
-     {}
-    ]
-   ],
-   "websockets/Send-binary-arraybufferview-int8.htm": [
-    [
-     "/websockets/Send-binary-arraybufferview-int8.htm",
-     {}
-    ]
-   ],
-   "websockets/Send-binary-blob.htm": [
-    [
-     "/websockets/Send-binary-blob.htm",
-     {}
-    ]
-   ],
-   "websockets/Send-data.htm": [
-    [
-     "/websockets/Send-data.htm",
+   "websockets/Close-1000-reason.any.js": [
+    [
+     "/websockets/Close-1000-reason.any.html",
+     {}
+    ],
+    [
+     "/websockets/Close-1000-reason.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Close-1000.any.js": [
+    [
+     "/websockets/Close-1000.any.html",
+     {}
+    ],
+    [
+     "/websockets/Close-1000.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Close-Reason-124Bytes.any.js": [
+    [
+     "/websockets/Close-Reason-124Bytes.any.html",
+     {}
+    ],
+    [
+     "/websockets/Close-Reason-124Bytes.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Close-reason-unpaired-surrogates.any.js": [
+    [
+     "/websockets/Close-reason-unpaired-surrogates.any.html",
+     {}
+    ],
+    [
+     "/websockets/Close-reason-unpaired-surrogates.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Close-undefined.any.js": [
+    [
+     "/websockets/Close-undefined.any.html",
+     {}
+    ],
+    [
+     "/websockets/Close-undefined.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-Secure-extensions-empty.any.js": [
+    [
+     "/websockets/Create-Secure-extensions-empty.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-Secure-extensions-empty.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-Secure-url-with-space.any.js": [
+    [
+     "/websockets/Create-Secure-url-with-space.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-Secure-url-with-space.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-Secure-valid-url-array-protocols.any.js": [
+    [
+     "/websockets/Create-Secure-valid-url-array-protocols.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-Secure-valid-url-array-protocols.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-Secure-valid-url-binaryType-blob.any.js": [
+    [
+     "/websockets/Create-Secure-valid-url-binaryType-blob.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-Secure-valid-url-binaryType-blob.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-Secure-valid-url-protocol-setCorrectly.any.js": [
+    [
+     "/websockets/Create-Secure-valid-url-protocol-setCorrectly.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-Secure-valid-url-protocol-setCorrectly.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-Secure-valid-url-protocol-string.any.js": [
+    [
+     "/websockets/Create-Secure-valid-url-protocol-string.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-Secure-valid-url-protocol-string.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-Secure-valid-url.any.js": [
+    [
+     "/websockets/Create-Secure-valid-url.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-Secure-valid-url.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-Secure-verify-url-set-non-default-port.any.js": [
+    [
+     "/websockets/Create-Secure-verify-url-set-non-default-port.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-Secure-verify-url-set-non-default-port.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-asciiSep-protocol-string.any.js": [
+    [
+     "/websockets/Create-asciiSep-protocol-string.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-asciiSep-protocol-string.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-blocked-port.any.js": [
+    [
+     "/websockets/Create-blocked-port.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-blocked-port.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-invalid-urls.any.js": [
+    [
+     "/websockets/Create-invalid-urls.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-invalid-urls.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-non-absolute-url.any.js": [
+    [
+     "/websockets/Create-non-absolute-url.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-non-absolute-url.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-nonAscii-protocol-string.any.js": [
+    [
+     "/websockets/Create-nonAscii-protocol-string.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-nonAscii-protocol-string.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-on-worker-shutdown.any.js": [
+    [
+     "/websockets/Create-on-worker-shutdown.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-on-worker-shutdown.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-protocol-with-space.any.js": [
+    [
+     "/websockets/Create-protocol-with-space.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-protocol-with-space.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-protocols-repeated-case-insensitive.any.js": [
+    [
+     "/websockets/Create-protocols-repeated-case-insensitive.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-protocols-repeated-case-insensitive.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-protocols-repeated.any.js": [
+    [
+     "/websockets/Create-protocols-repeated.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-protocols-repeated.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-valid-url-array-protocols.any.js": [
+    [
+     "/websockets/Create-valid-url-array-protocols.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-valid-url-array-protocols.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-valid-url-protocol-empty.any.js": [
+    [
+     "/websockets/Create-valid-url-protocol-empty.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-valid-url-protocol-empty.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-valid-url-protocol.any.js": [
+    [
+     "/websockets/Create-valid-url-protocol.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-valid-url-protocol.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-valid-url.any.js": [
+    [
+     "/websockets/Create-valid-url.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-valid-url.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-verify-url-set-non-default-port.any.js": [
+    [
+     "/websockets/Create-verify-url-set-non-default-port.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-verify-url-set-non-default-port.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Create-wrong-scheme.any.js": [
+    [
+     "/websockets/Create-wrong-scheme.any.html",
+     {}
+    ],
+    [
+     "/websockets/Create-wrong-scheme.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Close-1000-reason.any.js": [
+    [
+     "/websockets/Secure-Close-1000-reason.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Close-1000-reason.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Close-1000-verify-code.any.js": [
+    [
+     "/websockets/Secure-Close-1000-verify-code.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Close-1000-verify-code.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Close-1000.any.js": [
+    [
+     "/websockets/Secure-Close-1000.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Close-1000.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Close-1005-verify-code.any.js": [
+    [
+     "/websockets/Secure-Close-1005-verify-code.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Close-1005-verify-code.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Close-1005.any.js": [
+    [
+     "/websockets/Secure-Close-1005.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Close-1005.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Close-2999-reason.any.js": [
+    [
+     "/websockets/Secure-Close-2999-reason.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Close-2999-reason.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Close-3000-reason.any.js": [
+    [
+     "/websockets/Secure-Close-3000-reason.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Close-3000-reason.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Close-3000-verify-code.any.js": [
+    [
+     "/websockets/Secure-Close-3000-verify-code.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Close-3000-verify-code.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Close-4999-reason.any.js": [
+    [
+     "/websockets/Secure-Close-4999-reason.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Close-4999-reason.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Close-Reason-124Bytes.any.js": [
+    [
+     "/websockets/Secure-Close-Reason-124Bytes.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Close-Reason-124Bytes.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Close-Reason-Unpaired-surrogates.any.js": [
+    [
+     "/websockets/Secure-Close-Reason-Unpaired-surrogates.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Close-Reason-Unpaired-surrogates.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Close-onlyReason.any.js": [
+    [
+     "/websockets/Secure-Close-onlyReason.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Close-onlyReason.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Close-readyState-Closed.any.js": [
+    [
+     "/websockets/Secure-Close-readyState-Closed.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Close-readyState-Closed.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Close-readyState-Closing.any.js": [
+    [
+     "/websockets/Secure-Close-readyState-Closing.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Close-readyState-Closing.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Close-server-initiated-close.any.js": [
+    [
+     "/websockets/Secure-Close-server-initiated-close.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Close-server-initiated-close.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Close-undefined.any.js": [
+    [
+     "/websockets/Secure-Close-undefined.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Close-undefined.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Send-65K-data.any.js": [
+    [
+     "/websockets/Secure-Send-65K-data.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Send-65K-data.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Send-binary-65K-arraybuffer.any.js": [
+    [
+     "/websockets/Secure-Send-binary-65K-arraybuffer.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Send-binary-65K-arraybuffer.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Send-binary-arraybuffer.any.js": [
+    [
+     "/websockets/Secure-Send-binary-arraybuffer.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Send-binary-arraybuffer.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Send-binary-arraybufferview-float32.any.js": [
+    [
+     "/websockets/Secure-Send-binary-arraybufferview-float32.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Send-binary-arraybufferview-float32.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Send-binary-arraybufferview-float64.any.js": [
+    [
+     "/websockets/Secure-Send-binary-arraybufferview-float64.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Send-binary-arraybufferview-float64.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Send-binary-arraybufferview-int32.any.js": [
+    [
+     "/websockets/Secure-Send-binary-arraybufferview-int32.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Send-binary-arraybufferview-int32.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Send-binary-arraybufferview-uint16-offset-length.any.js": [
+    [
+     "/websockets/Secure-Send-binary-arraybufferview-uint16-offset-length.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Send-binary-arraybufferview-uint16-offset-length.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Send-binary-arraybufferview-uint32-offset.any.js": [
+    [
+     "/websockets/Secure-Send-binary-arraybufferview-uint32-offset.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Send-binary-arraybufferview-uint32-offset.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Send-binary-arraybufferview-uint8-offset-length.any.js": [
+    [
+     "/websockets/Secure-Send-binary-arraybufferview-uint8-offset-length.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Send-binary-arraybufferview-uint8-offset-length.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Send-binary-arraybufferview-uint8-offset.any.js": [
+    [
+     "/websockets/Secure-Send-binary-arraybufferview-uint8-offset.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Send-binary-arraybufferview-uint8-offset.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Send-binary-blob.any.js": [
+    [
+     "/websockets/Secure-Send-binary-blob.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Send-binary-blob.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Send-data.any.js": [
+    [
+     "/websockets/Secure-Send-data.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Send-data.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Send-null.any.js": [
+    [
+     "/websockets/Secure-Send-null.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Send-null.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Send-paired-surrogates.any.js": [
+    [
+     "/websockets/Secure-Send-paired-surrogates.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Send-paired-surrogates.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Send-unicode-data.any.js": [
+    [
+     "/websockets/Secure-Send-unicode-data.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Send-unicode-data.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Secure-Send-unpaired-surrogates.any.js": [
+    [
+     "/websockets/Secure-Send-unpaired-surrogates.any.html",
+     {}
+    ],
+    [
+     "/websockets/Secure-Send-unpaired-surrogates.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Send-0byte-data.any.js": [
+    [
+     "/websockets/Send-0byte-data.any.html",
+     {}
+    ],
+    [
+     "/websockets/Send-0byte-data.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Send-65K-data.any.js": [
+    [
+     "/websockets/Send-65K-data.any.html",
+     {}
+    ],
+    [
+     "/websockets/Send-65K-data.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Send-Unpaired-Surrogates.any.js": [
+    [
+     "/websockets/Send-Unpaired-Surrogates.any.html",
+     {}
+    ],
+    [
+     "/websockets/Send-Unpaired-Surrogates.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Send-before-open.any.js": [
+    [
+     "/websockets/Send-before-open.any.html",
+     {}
+    ],
+    [
+     "/websockets/Send-before-open.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Send-binary-65K-arraybuffer.any.js": [
+    [
+     "/websockets/Send-binary-65K-arraybuffer.any.html",
+     {}
+    ],
+    [
+     "/websockets/Send-binary-65K-arraybuffer.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Send-binary-arraybuffer.any.js": [
+    [
+     "/websockets/Send-binary-arraybuffer.any.html",
+     {}
+    ],
+    [
+     "/websockets/Send-binary-arraybuffer.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Send-binary-arraybufferview-int16-offset.any.js": [
+    [
+     "/websockets/Send-binary-arraybufferview-int16-offset.any.html",
+     {}
+    ],
+    [
+     "/websockets/Send-binary-arraybufferview-int16-offset.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Send-binary-arraybufferview-int8.any.js": [
+    [
+     "/websockets/Send-binary-arraybufferview-int8.any.html",
+     {}
+    ],
+    [
+     "/websockets/Send-binary-arraybufferview-int8.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Send-binary-blob.any.js": [
+    [
+     "/websockets/Send-binary-blob.any.html",
+     {}
+    ],
+    [
+     "/websockets/Send-binary-blob.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Send-data.any.js": [
+    [
+     "/websockets/Send-data.any.html",
+     {}
+    ],
+    [
+     "/websockets/Send-data.any.worker.html",
      {}
     ]
    ],
    "websockets/Send-data.worker.js": [
     [
      "/websockets/Send-data.worker.html",
      {}
     ]
    ],
-   "websockets/Send-null.htm": [
-    [
-     "/websockets/Send-null.htm",
-     {}
-    ]
-   ],
-   "websockets/Send-paired-surrogates.htm": [
-    [
-     "/websockets/Send-paired-surrogates.htm",
-     {}
-    ]
-   ],
-   "websockets/Send-unicode-data.htm": [
-    [
-     "/websockets/Send-unicode-data.htm",
+   "websockets/Send-null.any.js": [
+    [
+     "/websockets/Send-null.any.html",
+     {}
+    ],
+    [
+     "/websockets/Send-null.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Send-paired-surrogates.any.js": [
+    [
+     "/websockets/Send-paired-surrogates.any.html",
+     {}
+    ],
+    [
+     "/websockets/Send-paired-surrogates.any.worker.html",
+     {}
+    ]
+   ],
+   "websockets/Send-unicode-data.any.js": [
+    [
+     "/websockets/Send-unicode-data.any.html",
+     {}
+    ],
+    [
+     "/websockets/Send-unicode-data.any.worker.html",
      {}
     ]
    ],
    "websockets/binary/001.html": [
     [
      "/websockets/binary/001.html",
      {}
     ],
@@ -370719,19 +371011,23 @@
      "/websockets/binary/005.html",
      {}
     ],
     [
      "/websockets/binary/005.html?wss",
      {}
     ]
    ],
-   "websockets/binaryType-wrong-value.htm": [
-    [
-     "/websockets/binaryType-wrong-value.htm",
+   "websockets/binaryType-wrong-value.any.js": [
+    [
+     "/websockets/binaryType-wrong-value.any.html",
+     {}
+    ],
+    [
+     "/websockets/binaryType-wrong-value.any.worker.html",
      {}
     ]
    ],
    "websockets/close-invalid.any.js": [
     [
      "/websockets/close-invalid.any.html",
      {}
     ],
@@ -370765,19 +371061,23 @@
      "/websockets/closing-handshake/004.html",
      {}
     ],
     [
      "/websockets/closing-handshake/004.html?wss",
      {}
     ]
    ],
-   "websockets/constructor.html": [
-    [
-     "/websockets/constructor.html",
+   "websockets/constructor.any.js": [
+    [
+     "/websockets/constructor.any.html",
+     {}
+    ],
+    [
+     "/websockets/constructor.any.worker.html",
      {}
     ]
    ],
    "websockets/constructor/001.html": [
     [
      "/websockets/constructor/001.html",
      {}
     ],
@@ -371057,19 +371357,23 @@
     ],
     [
      "/websockets/cookies/007.html?wss",
      {
       "timeout": "long"
      }
     ]
    ],
-   "websockets/eventhandlers.html": [
-    [
-     "/websockets/eventhandlers.html",
+   "websockets/eventhandlers.any.js": [
+    [
+     "/websockets/eventhandlers.any.html",
+     {}
+    ],
+    [
+     "/websockets/eventhandlers.any.worker.html",
      {}
     ]
    ],
    "websockets/extended-payload-length.html": [
     [
      "/websockets/extended-payload-length.html",
      {
       "timeout": "long"
@@ -609360,318 +609664,318 @@
   "webrtc/tools/package-lock.json": [
    "731c41b82c17db5d5c3e0c636c197fcba01df344",
    "support"
   ],
   "webrtc/tools/package.json": [
    "67474f98b40d247ebac9cdee2146019a8e0b10b1",
    "support"
   ],
-  "websockets/Close-1000-reason.htm": [
-   "a3733fc46f0a5358cc8dbfd74d422e1a598bdf64",
-   "testharness"
-  ],
-  "websockets/Close-1000.htm": [
-   "0069f2d11be01418818303b4b684b66286e19b66",
-   "testharness"
-  ],
-  "websockets/Close-Reason-124Bytes.htm": [
-   "2e5cba512f7c5ee4555dcbddfb828aefcc59a833",
-   "testharness"
-  ],
-  "websockets/Close-reason-unpaired-surrogates.htm": [
-   "ceb97248d6008bb64cfba83db29ebcc10e0d1342",
-   "testharness"
-  ],
-  "websockets/Close-undefined.htm": [
-   "ba4e24f11a947545effc1b1f3dbf88596bae07ca",
-   "testharness"
-  ],
-  "websockets/Create-Secure-extensions-empty.htm": [
-   "43b0888236645f21b9d6bb47de5084416a84e9c5",
-   "testharness"
-  ],
-  "websockets/Create-Secure-url-with-space.htm": [
-   "efbd97dc88a100d175319ee25d2348a775d81c38",
-   "testharness"
-  ],
-  "websockets/Create-Secure-valid-url-array-protocols.htm": [
-   "2d50bb602ad9d63e3861f20b3036bddbc26d8652",
-   "testharness"
-  ],
-  "websockets/Create-Secure-valid-url-binaryType-blob.htm": [
-   "d21546210669e9dee52ef2ee6e061cb58ed71793",
-   "testharness"
-  ],
-  "websockets/Create-Secure-valid-url-protocol-setCorrectly.htm": [
-   "dc29257cc894ac0dca51274f2e3b4907f479709c",
-   "testharness"
-  ],
-  "websockets/Create-Secure-valid-url-protocol-string.htm": [
-   "a75a612744e1dee1f880f6742fc911bcd479fa0a",
-   "testharness"
-  ],
-  "websockets/Create-Secure-valid-url.htm": [
-   "38b96b5067655fd49e8ccba22ef3e9ba7781bc9c",
-   "testharness"
-  ],
-  "websockets/Create-Secure-verify-url-set-non-default-port.htm": [
-   "42c638cfe0a02d34bb7280f0f3a046f9a86bcfc5",
-   "testharness"
-  ],
-  "websockets/Create-asciiSep-protocol-string.htm": [
-   "36b2fb2c3e2f7592ef4c3ab0494bf89e514235ac",
-   "testharness"
-  ],
-  "websockets/Create-blocked-port.htm": [
-   "7a385334740d92171f8a07dc63f7b43e7588160b",
-   "testharness"
-  ],
-  "websockets/Create-invalid-urls.htm": [
-   "f5e8116cf1aafc7f307031c8eae3bca22017eb09",
-   "testharness"
-  ],
-  "websockets/Create-non-absolute-url.htm": [
-   "f3255ca1da5c8e81c37e658cb2dc83e1a7dc2e63",
-   "testharness"
-  ],
-  "websockets/Create-nonAscii-protocol-string.htm": [
-   "f556c52a5ba7370dfd94f57331d606b147b0932f",
-   "testharness"
-  ],
-  "websockets/Create-on-worker-shutdown.html": [
-   "213d7b23d154b930cc20985c2a86509fcdc09a9a",
-   "testharness"
-  ],
-  "websockets/Create-protocol-with-space.htm": [
-   "923fd2681d86812d63347f995f91747ebec18a44",
-   "testharness"
-  ],
-  "websockets/Create-protocols-repeated-case-insensitive.htm": [
-   "55a3dbf713cf45900f8af2e9c9bc2f41bb447141",
-   "testharness"
-  ],
-  "websockets/Create-protocols-repeated.htm": [
-   "3c5bfbf4d7f15cdbb59c23d445478779756d0446",
-   "testharness"
-  ],
-  "websockets/Create-valid-url-array-protocols.htm": [
-   "35ce12e805210326787f541c14ec51e05a690b14",
-   "testharness"
-  ],
-  "websockets/Create-valid-url-protocol-empty.htm": [
-   "73f7c09d0ece2e04dc58fb7a7393d29cbfe0ea43",
-   "testharness"
-  ],
-  "websockets/Create-valid-url-protocol.htm": [
-   "46072d6def631dd1ea02fb9c9ea2e3055fef030c",
-   "testharness"
-  ],
-  "websockets/Create-valid-url.htm": [
-   "3e2100b411287b23ac1482042c41e38589258b7d",
-   "testharness"
-  ],
-  "websockets/Create-verify-url-set-non-default-port.htm": [
-   "db720152509ca6e887861253bea84c0d4df26cfc",
-   "testharness"
-  ],
-  "websockets/Create-wrong-scheme.htm": [
-   "a09b10dacf5cd94470b976b8129c63d76d554295",
+  "websockets/Close-1000-reason.any.js": [
+   "232e2286e3a5d8017a4da0d6800af6f955e802be",
+   "testharness"
+  ],
+  "websockets/Close-1000.any.js": [
+   "9aacd24847225cc15883bc97fe6083b1bce87585",
+   "testharness"
+  ],
+  "websockets/Close-Reason-124Bytes.any.js": [
+   "8fa6ced38fcc2199953370eefcb5007999d8f294",
+   "testharness"
+  ],
+  "websockets/Close-reason-unpaired-surrogates.any.js": [
+   "11a06fcb4b623667e880fa1b8410a0bceb158d13",
+   "testharness"
+  ],
+  "websockets/Close-undefined.any.js": [
+   "e83fdcf0a96ff04974ab87cf103f1c6aa0da816d",
+   "testharness"
+  ],
+  "websockets/Create-Secure-extensions-empty.any.js": [
+   "29649e1db7331a95da9f62b19d31bc072ee6fe81",
+   "testharness"
+  ],
+  "websockets/Create-Secure-url-with-space.any.js": [
+   "06ac8bf7174529557116aade3a716a340e9d1500",
+   "testharness"
+  ],
+  "websockets/Create-Secure-valid-url-array-protocols.any.js": [
+   "242bf917d9ac4dcf6f11a8a9d1b597f956a4ef9e",
+   "testharness"
+  ],
+  "websockets/Create-Secure-valid-url-binaryType-blob.any.js": [
+   "d0129913180eb49c7836672274386b26e1a26c09",
+   "testharness"
+  ],
+  "websockets/Create-Secure-valid-url-protocol-setCorrectly.any.js": [
+   "e12b21a173d36dc1ecf06317f99e3dab212e5f53",
+   "testharness"
+  ],
+  "websockets/Create-Secure-valid-url-protocol-string.any.js": [
+   "34690bcf8232fe3ea672325af804e40025263fd5",
+   "testharness"
+  ],
+  "websockets/Create-Secure-valid-url.any.js": [
+   "c88bfec8807165df66fe07c9f45e84c4ce407a27",
+   "testharness"
+  ],
+  "websockets/Create-Secure-verify-url-set-non-default-port.any.js": [
+   "3d5c48e01b37a39e47b9192e30d38d21d7278326",
+   "testharness"
+  ],
+  "websockets/Create-asciiSep-protocol-string.any.js": [
+   "b0778289d527b2a580788d91415ea70ca329caa2",
+   "testharness"
+  ],
+  "websockets/Create-blocked-port.any.js": [
+   "b2fba708f014738eee1efcceeb4c396ebf5ca5e8",
+   "testharness"
+  ],
+  "websockets/Create-invalid-urls.any.js": [
+   "a61ec657e6b8e81b7ea3fd196f1553cf001c0b51",
+   "testharness"
+  ],
+  "websockets/Create-non-absolute-url.any.js": [
+   "43a74d73fe628dce359ae02a549ac6eebde63c04",
+   "testharness"
+  ],
+  "websockets/Create-nonAscii-protocol-string.any.js": [
+   "7354ded8647d934361f297eac82e6c35c332e3de",
+   "testharness"
+  ],
+  "websockets/Create-on-worker-shutdown.any.js": [
+   "57f21323713704a799152014136f17205d26476d",
+   "testharness"
+  ],
+  "websockets/Create-protocol-with-space.any.js": [
+   "0952d876349721a3ce7d8f444310265b56714e31",
+   "testharness"
+  ],
+  "websockets/Create-protocols-repeated-case-insensitive.any.js": [
+   "119f105406ffd23d5e061907dfd05a033ab063a6",
+   "testharness"
+  ],
+  "websockets/Create-protocols-repeated.any.js": [
+   "7d9693702e2c00b5ad4f5f20ced8ee6d4f5b995e",
+   "testharness"
+  ],
+  "websockets/Create-valid-url-array-protocols.any.js": [
+   "ef97eccc11ffd79158008ccbe5a883cc71e0bb2e",
+   "testharness"
+  ],
+  "websockets/Create-valid-url-protocol-empty.any.js": [
+   "0a373bbf19d2632d56ae7a798b628a2590544625",
+   "testharness"
+  ],
+  "websockets/Create-valid-url-protocol.any.js": [
+   "7781737cf28ba7d96fdbf5db96c461b3f1b784ca",
+   "testharness"
+  ],
+  "websockets/Create-valid-url.any.js": [
+   "5fd613b75c784f6c8c3f73775701afc132460167",
+   "testharness"
+  ],
+  "websockets/Create-verify-url-set-non-default-port.any.js": [
+   "395dcc95796f3208ef4c70f02f3b9ef968f52ad9",
+   "testharness"
+  ],
+  "websockets/Create-wrong-scheme.any.js": [
+   "972ee46955f31fa402fcd0c83e528f2a803cad5b",
    "testharness"
   ],
   "websockets/OWNERS": [
    "10f99e83578e8082173bb1da68f7fb6f1c371d58",
    "support"
   ],
   "websockets/README.md": [
    "42c6183f2b71442d96a023f2c05ab6ed10f06180",
    "support"
   ],
-  "websockets/Secure-Close-1000-reason.htm": [
-   "efdaaff2b022593bb07ed84ff5908577ede569a7",
-   "testharness"
-  ],
-  "websockets/Secure-Close-1000-verify-code.htm": [
-   "eae076f962a5cbd9486f5fbd789e312c4e5a3d2e",
-   "testharness"
-  ],
-  "websockets/Secure-Close-1000.htm": [
-   "eab6ab47671ee679a0a44347a6fcf3f3549b7b94",
-   "testharness"
-  ],
-  "websockets/Secure-Close-1005-verify-code.htm": [
-   "fb6c2597b519a20b35c0dd2c3f029389be6532a9",
-   "testharness"
-  ],
-  "websockets/Secure-Close-1005.htm": [
-   "adb8d72ce31891ebca7c11f61692dd4f39339e92",
-   "testharness"
-  ],
-  "websockets/Secure-Close-2999-reason.htm": [
-   "43c67789e3c68bc900411146a143219effb315bb",
-   "testharness"
-  ],
-  "websockets/Secure-Close-3000-reason.htm": [
-   "0695a3ebc6c672938cbce1f789a0513ee6db568f",
-   "testharness"
-  ],
-  "websockets/Secure-Close-3000-verify-code.htm": [
-   "feb82aba92cdaa40609259f1187d71ace00ab5af",
-   "testharness"
-  ],
-  "websockets/Secure-Close-4999-reason.htm": [
-   "0b1951f1f1cf9c8cb60a55046c45ffdff556c081",
-   "testharness"
-  ],
-  "websockets/Secure-Close-Reason-124Bytes.htm": [
-   "c53e247ed528f3cec25b8848260f0e7eaa643716",
-   "testharness"
-  ],
-  "websockets/Secure-Close-Reason-Unpaired-surrogates.htm": [
-   "49b47b4ced20884680a8628ad9b357a66019fe96",
-   "testharness"
-  ],
-  "websockets/Secure-Close-onlyReason.htm": [
-   "41c7c1faa23830c808f5f99768cabb30ec4edc53",
-   "testharness"
-  ],
-  "websockets/Secure-Close-readyState-Closed.htm": [
-   "052c9bb606637edc33e59ba9fa3e67deaf5e74e5",
-   "testharness"
-  ],
-  "websockets/Secure-Close-readyState-Closing.htm": [
-   "35704eaf42480235c09ba2bae0e34f8d733682b5",
-   "testharness"
-  ],
-  "websockets/Secure-Close-server-initiated-close.htm": [
-   "b5937b68def472531f56b35d960734ce1b27d392",
-   "testharness"
-  ],
-  "websockets/Secure-Close-undefined.htm": [
-   "d512819928be3394d94ac6d912e53937068b0f75",
-   "testharness"
-  ],
-  "websockets/Secure-Send-65K-data.htm": [
-   "feb8e310899761a838be2629d5e7292da0a25c83",
-   "testharness"
-  ],
-  "websockets/Secure-Send-binary-65K-arraybuffer.htm": [
-   "2cc593f16e1d0d7be2e294417b77d7859179632f",
-   "testharness"
-  ],
-  "websockets/Secure-Send-binary-arraybuffer.htm": [
-   "78fb09f9b69bde01f34dae580488c7dc9f33af88",
-   "testharness"
-  ],
-  "websockets/Secure-Send-binary-arraybufferview-float32.htm": [
-   "758da1119fc55fbe9429898b95097248c3c700ee",
-   "testharness"
-  ],
-  "websockets/Secure-Send-binary-arraybufferview-float64.htm": [
-   "fa78032fd2927ec8f15cdc2fb62d41eb1b67dbe6",
-   "testharness"
-  ],
-  "websockets/Secure-Send-binary-arraybufferview-int32.htm": [
-   "072b01fd222c48e764516c92813a4a2761d0bc12",
-   "testharness"
-  ],
-  "websockets/Secure-Send-binary-arraybufferview-uint16-offset-length.htm": [
-   "dc11615983d4284daa42ee8abbc7816102d4c466",
-   "testharness"
-  ],
-  "websockets/Secure-Send-binary-arraybufferview-uint32-offset.htm": [
-   "8fc6f7bc526a39fde7185659531c572a278e8549",
-   "testharness"
-  ],
-  "websockets/Secure-Send-binary-arraybufferview-uint8-offset-length.htm": [
-   "a2e88d419ce9fc3bfc068a5f08e63c19757ff4d8",
-   "testharness"
-  ],
-  "websockets/Secure-Send-binary-arraybufferview-uint8-offset.htm": [
-   "077a984a831b2ac1e671211a08a99e0e50629c39",
-   "testharness"
-  ],
-  "websockets/Secure-Send-binary-blob.htm": [
-   "dcc7c4adac3cfb7e970011669665fc160bfa20c5",
-   "testharness"
-  ],
-  "websockets/Secure-Send-data.htm": [
-   "11ea2e974c8783690f647056043539c707896062",
-   "testharness"
-  ],
-  "websockets/Secure-Send-null.htm": [
-   "8836b74fd5560ddc2de107f39f3a55c9ae872c58",
-   "testharness"
-  ],
-  "websockets/Secure-Send-paired-surrogates.htm": [
-   "cf37fc5bb12a0d5cccfb93f052db9244c27a425a",
-   "testharness"
-  ],
-  "websockets/Secure-Send-unicode-data.htm": [
-   "f47a23c0b4ef9282e4186a57b42837bb2f5a072b",
-   "testharness"
-  ],
-  "websockets/Secure-Send-unpaired-surrogates.htm": [
-   "42bae64815bac37b3af91cb069fa91e3a4ad4dde",
-   "testharness"
-  ],
-  "websockets/Send-0byte-data.htm": [
-   "f9d31c7341f80323a6f3a45c50447fde5db3bccd",
-   "testharness"
-  ],
-  "websockets/Send-65K-data.htm": [
-   "e4b64f085429773f757c02a3fd6e1a740929a411",
-   "testharness"
-  ],
-  "websockets/Send-Unpaired-Surrogates.htm": [
-   "8a589aac896c1354ffb056b77542a407128bf560",
-   "testharness"
-  ],
-  "websockets/Send-before-open.htm": [
-   "5fa9343d7b7378e496f18097748f0d268090b166",
-   "testharness"
-  ],
-  "websockets/Send-binary-65K-arraybuffer.htm": [
-   "f45db48ab7d94c96b997628b5a431d1d992c98ac",
-   "testharness"
-  ],
-  "websockets/Send-binary-arraybuffer.htm": [
-   "7f1337c564d41a4a0208bed137128a3ee0796047",
-   "testharness"
-  ],
-  "websockets/Send-binary-arraybufferview-int16-offset.htm": [
-   "13dc817a45a97179bd155720d826d3d7dd683762",
-   "testharness"
-  ],
-  "websockets/Send-binary-arraybufferview-int8.htm": [
-   "b1c1938fceea9f8e56848b67af0279028e97e1be",
-   "testharness"
-  ],
-  "websockets/Send-binary-blob.htm": [
-   "2f225979d20881e5e8a7be665d439b320e2c631e",
-   "testharness"
-  ],
-  "websockets/Send-data.htm": [
-   "564e6c8508b2eda5b194d5b901f2db12991894a9",
+  "websockets/Secure-Close-1000-reason.any.js": [
+   "fbca7237aa1fcd8d93e61f1a25ce54e42ef947fe",
+   "testharness"
+  ],
+  "websockets/Secure-Close-1000-verify-code.any.js": [
+   "218c68a257e21c5f60dcf2d92e418e48955586a6",
+   "testharness"
+  ],
+  "websockets/Secure-Close-1000.any.js": [
+   "c6c4580f1b8da8e1ad36cb143601495362bfd508",
+   "testharness"
+  ],
+  "websockets/Secure-Close-1005-verify-code.any.js": [
+   "f0bf3684d5aeb48bd86fba2c02efd9f8190181f5",
+   "testharness"
+  ],
+  "websockets/Secure-Close-1005.any.js": [
+   "e23e64eccd5a030e894f09ffe798d3ddb67de995",
+   "testharness"
+  ],
+  "websockets/Secure-Close-2999-reason.any.js": [
+   "683f82a05bac2622bda9f6a45d78174d49451541",
+   "testharness"
+  ],
+  "websockets/Secure-Close-3000-reason.any.js": [
+   "2d7d21e6e694f95493b6bb29af9e917b5bc87c3e",
+   "testharness"
+  ],
+  "websockets/Secure-Close-3000-verify-code.any.js": [
+   "163a79159ada3cfb3ace3198b6e4374b9d46478a",
+   "testharness"
+  ],
+  "websockets/Secure-Close-4999-reason.any.js": [
+   "fce275a67d48f16dd383e4a1e40c9aae20604d56",
+   "testharness"
+  ],
+  "websockets/Secure-Close-Reason-124Bytes.any.js": [
+   "f92ea585dd90a6e2a7d60c1199aa55c053e1d0fd",
+   "testharness"
+  ],
+  "websockets/Secure-Close-Reason-Unpaired-surrogates.any.js": [
+   "8d8499fe89fb9391011851d02a2a1cc87f3091d5",
+   "testharness"
+  ],
+  "websockets/Secure-Close-onlyReason.any.js": [
+   "094f560d486ed7d46c583f8412b27d4aa472cf3c",
+   "testharness"
+  ],
+  "websockets/Secure-Close-readyState-Closed.any.js": [
+   "38acc8f3a4469183285601cf9345a924488e45c9",
+   "testharness"
+  ],
+  "websockets/Secure-Close-readyState-Closing.any.js": [
+   "aded4a277b4c64b8c3ded0a4f4b0779d08b3cea6",
+   "testharness"
+  ],
+  "websockets/Secure-Close-server-initiated-close.any.js": [
+   "1d87d57a4d15f4b811a2c420af673365a107b407",
+   "testharness"
+  ],
+  "websockets/Secure-Close-undefined.any.js": [
+   "3e508273245b39ea92e0cf3ab9d593627520368b",
+   "testharness"
+  ],
+  "websockets/Secure-Send-65K-data.any.js": [
+   "d104efed7f007b3f7de3caae01fe806e1c530880",
+   "testharness"
+  ],
+  "websockets/Secure-Send-binary-65K-arraybuffer.any.js": [
+   "e9266889aee0cdfcf086582583ed93a14f6385b3",
+   "testharness"
+  ],
+  "websockets/Secure-Send-binary-arraybuffer.any.js": [
+   "cc091b222b393d6d909362c156e8eaa72152188f",
+   "testharness"
+  ],
+  "websockets/Secure-Send-binary-arraybufferview-float32.any.js": [
+   "59517667216000d2478a85b1d7b055cebf4a754b",
+   "testharness"
+  ],
+  "websockets/Secure-Send-binary-arraybufferview-float64.any.js": [
+   "b7ae95fa2dd0ab49debc4d6642a419ee4a7f35ce",
+   "testharness"
+  ],
+  "websockets/Secure-Send-binary-arraybufferview-int32.any.js": [
+   "4ef004ec08824b203f6cbdc975389a9dff654cb0",
+   "testharness"
+  ],
+  "websockets/Secure-Send-binary-arraybufferview-uint16-offset-length.any.js": [
+   "c781ce38ea37f957d4d137736030b966721631f0",
+   "testharness"
+  ],
+  "websockets/Secure-Send-binary-arraybufferview-uint32-offset.any.js": [
+   "39cea2900157e85cf65872050800d0ea7d466a55",
+   "testharness"
+  ],
+  "websockets/Secure-Send-binary-arraybufferview-uint8-offset-length.any.js": [
+   "e106db1dc4ca7a06fa774be241095e4e6deb60e8",
+   "testharness"
+  ],
+  "websockets/Secure-Send-binary-arraybufferview-uint8-offset.any.js": [
+   "8f9e231fe07f0ed7e567f24c534333cfb9cb32fb",
+   "testharness"
+  ],
+  "websockets/Secure-Send-binary-blob.any.js": [
+   "a1a21715d21201d6fad1f0335a5ea0e51e31cd1b",
+   "testharness"
+  ],
+  "websockets/Secure-Send-data.any.js": [
+   "b10e32b6d25283cfe95d00a142b389610b646862",
+   "testharness"
+  ],
+  "websockets/Secure-Send-null.any.js": [
+   "eb112f60b553a387ac8a27f53b58e96afa4de1aa",
+   "testharness"
+  ],
+  "websockets/Secure-Send-paired-surrogates.any.js": [
+   "aa67cb57c54847413d87f367d49079e92a0062a8",
+   "testharness"
+  ],
+  "websockets/Secure-Send-unicode-data.any.js": [
+   "f745957aac340a3125bb70548063dd16ed681ead",
+   "testharness"
+  ],
+  "websockets/Secure-Send-unpaired-surrogates.any.js": [
+   "44db96d250737541d81b85c16bfc13814b213ef9",
+   "testharness"
+  ],
+  "websockets/Send-0byte-data.any.js": [
+   "2c21aa13b8ce7b4baf94ef0bb8b583be9608e10e",
+   "testharness"
+  ],
+  "websockets/Send-65K-data.any.js": [
+   "4ef718a1e4211c5e96c7ef54568ced94a05fc0ff",
+   "testharness"
+  ],
+  "websockets/Send-Unpaired-Surrogates.any.js": [
+   "565ec0feb15b7e71df3be3fd8b5ec049cd40b43d",
+   "testharness"
+  ],
+  "websockets/Send-before-open.any.js": [
+   "8a3f6d4560e087962406377082b5be13851adfec",
+   "testharness"
+  ],
+  "websockets/Send-binary-65K-arraybuffer.any.js": [
+   "6ef670a54495dec8beb8f64cf94316b2a02d7a0e",
+   "testharness"
+  ],
+  "websockets/Send-binary-arraybuffer.any.js": [
+   "68e1aea078f7f9584727a59e2e6b4de3c65dc124",
+   "testharness"
+  ],
+  "websockets/Send-binary-arraybufferview-int16-offset.any.js": [
+   "4e3e87ed3db6af233a42eaa701922447a12db386",
+   "testharness"
+  ],
+  "websockets/Send-binary-arraybufferview-int8.any.js": [
+   "03b5defa1ec4c48b91f70b49cc6ea97a405c71b2",
+   "testharness"
+  ],
+  "websockets/Send-binary-blob.any.js": [
+   "04e9e6a6bf04008e30687723bf9ffcfdc44096c1",
+   "testharness"
+  ],
+  "websockets/Send-data.any.js": [
+   "91c1ceaacb5851b9b440d07788a8eef33d2d6005",
    "testharness"
   ],
   "websockets/Send-data.worker.js": [
    "15e48679dd7355ad5d0a3abe3e21ec12494f804d",
    "testharness"
   ],
-  "websockets/Send-null.htm": [
-   "aaea5803d872e01e9eda000a888dc601296798b8",
-   "testharness"
-  ],
-  "websockets/Send-paired-surrogates.htm": [
-   "d01ddc6f6a84a97a32af15661385d316b42d6e05",
-   "testharness"
-  ],
-  "websockets/Send-unicode-data.htm": [
-   "4dc9fad1832c1057a6818a71c458bf340bc2afb2",
+  "websockets/Send-null.any.js": [
+   "ebffe5099f644882956b1625f9017622a2f1f05f",
+   "testharness"
+  ],
+  "websockets/Send-paired-surrogates.any.js": [
+   "196a425e64e9ec7d4e40bb72723abc349d3ed929",
+   "testharness"
+  ],
+  "websockets/Send-unicode-data.any.js": [
+   "5408066bfb2939cf2e6c2ce5f03dd0fb86c17e60",
    "testharness"
   ],
   "websockets/binary/001.html": [
    "127d6a587adf6dd3cfd9dd96ad80dfad5afdeea3",
    "testharness"
   ],
   "websockets/binary/002.html": [
    "904a6d9ac64b24a9b4b4e3ebc268a3f8d20726b2",
@@ -609680,18 +609984,18 @@
   "websockets/binary/004.html": [
    "8f6fa94cd40f4dd937e8e7e44d09bec4eb86d8ae",
    "testharness"
   ],
   "websockets/binary/005.html": [
    "ead8c6611c8dedcd913f6021d457c2452ce0c793",
    "testharness"
   ],
-  "websockets/binaryType-wrong-value.htm": [
-   "6873fe9127b4b5100f228e5821cfc41735906429",
+  "websockets/binaryType-wrong-value.any.js": [
+   "2dd693107e5bf29112bd3d08b45c6eccb081569e",
    "testharness"
   ],
   "websockets/close-invalid.any.js": [
    "d50557d4578f2d96080748315dcc8ffc7d6b7485",
    "testharness"
   ],
   "websockets/closing-handshake/002.html": [
    "5b6e5f3f0b31a6eeaded1a137516405fa69ef8ec",
@@ -609704,18 +610008,18 @@
   "websockets/closing-handshake/004.html": [
    "c9453f90be53c38d7b4a4e8aa8e8040d2d6f8ab9",
    "testharness"
   ],
   "websockets/constants.js": [
    "18bf7dad370e0dbe3cdc3d738448ebae87673b35",
    "support"
   ],
-  "websockets/constructor.html": [
-   "d3b167c749ee22dbc935e0eaf5d65c2c488d3808",
+  "websockets/constructor.any.js": [
+   "657960be0311f8859d64d69bfba00ffd493e135f",
    "testharness"
   ],
   "websockets/constructor/001.html": [
    "04a3ceb6f0f0ee9cc8e58b298a9c086faf432fcd",
    "testharness"
   ],
   "websockets/constructor/002.html": [
    "4288a4cfc4ae73afb9b93b2c2c8e05c182a6a5e1",
@@ -609820,18 +610124,18 @@
   "websockets/cookies/007.html": [
    "770db52470c5b18b6d92384763568d1dd859eb89",
    "testharness"
   ],
   "websockets/cookies/support/set-cookie.py": [
    "4975c1735e1140a7528056c954c34a63227c3180",
    "support"
   ],
-  "websockets/eventhandlers.html": [
-   "430d1e421f7a6b66ea924d922c69184edebffa7c",
+  "websockets/eventhandlers.any.js": [
+   "ca5ba116d24a47d5903d1d76333fc7ae2da68cb0",
    "testharness"
   ],
   "websockets/extended-payload-length.html": [
    "13fe0096aeb23c249d41fb6dcafafeab1d319fc3",
    "testharness"
   ],
   "websockets/handlers/echo-cookie_wsh.py": [
    "af25163add710a6dc87f40d7ef7e75ba056543d4",
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Close-1000-reason.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(1000, reason) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
+
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.close(1000, "Clean Close");
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be opened");
+            assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
+            assert_equals(evt.wasClean, true, "wasClean should be TRUE");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Close-1000-reason.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close WebSocket - Code is 1000 and reason</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(1000, reason) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
-
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.close(1000, "Clean Close");
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be opened");
-            assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
-            assert_equals(evt.wasClean, true, "wasClean should be TRUE");
-            testClose.done();
-        }), true);
-
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Close-1000.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create WebSocket - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(1000) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
+
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.close(1000);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be opened");
+            assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
+            assert_equals(evt.wasClean, true, "wasClean should be TRUE");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Close-1000.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close WebSocket - Code is 1000</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create WebSocket - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(1000) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
-
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.close(1000);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be opened");
-            assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
-            assert_equals(evt.wasClean, true, "wasClean should be TRUE");
-            testClose.done();
-        }), true);
-
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Close-Reason-124Bytes.any.js
@@ -0,0 +1,13 @@
+// META: script=websocket.sub.js
+
+        var test = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(code, 'reason more than 123 bytes') - SYNTAX_ERR is thrown");
+
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', test.step_func(function (evt) {
+            var reason = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123";
+            assert_equals(reason.length, 124);
+            assert_throws("SYNTAX_ERR", function () { wsocket.close(1000, reason) });
+            test.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Close-Reason-124Bytes.htm
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close WebSocket - Reason is more than 123 bytes long</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var test = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(code, 'reason more than 123 bytes') - SYNTAX_ERR is thrown");
-
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', test.step_func(function (evt) {
-            var reason = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123";
-            assert_equals(reason.length, 124);
-            assert_throws("SYNTAX_ERR", function () { wsocket.close(1000, reason) });
-            test.done();
-        }), true);
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Close-reason-unpaired-surrogates.any.js
@@ -0,0 +1,21 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get opened");
+        var testClose = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get closed");
+
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+        var replacementChar = "\uFFFD";
+        var reason = "\uD807";
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.close(1000, reason);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be opened");
+            assert_equals(evt.reason, replacementChar, "reason replaced with replacement character");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Close-reason-unpaired-surrogates.htm
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close WebSocket - Reason with unpaired surrogates</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get opened");
-        var testClose = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get closed");
-
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-        var replacementChar = "\uFFFD";
-        var reason = "\uD807";
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.close(1000, reason);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be opened");
-            assert_equals(evt.reason, replacementChar, "reason replaced with replacement character");
-            testClose.done();
-        }), true);
-
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Close-undefined.any.js
@@ -0,0 +1,11 @@
+// META: script=websocket.sub.js
+
+        var test = async_test();
+
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', test.step_func(function (evt) {
+            wsocket.close(undefined);
+            test.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Close-undefined.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close WebSocket - Code is undefined</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var test = async_test();
-
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', test.step_func(function (evt) {
-            wsocket.close(undefined);
-            test.done();
-        }), true);
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-Secure-extensions-empty.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - wsocket.extensions should be set to '' after connection is established - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - wsocket.extensions should be set to '' after connection is established - Connection should be closed");
+
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            assert_equals(wsocket.extensions, "", "extensions should be empty");
+            wsocket.close();
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be closed");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-Secure-extensions-empty.htm
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create Secure WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - wsocket.extensions should be set to '' after connection is established - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - wsocket.extensions should be set to '' after connection is established - Connection should be closed");
-
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            assert_equals(wsocket.extensions, "", "extensions should be empty");
-            wsocket.close();
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be closed");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-Secure-url-with-space.any.js
@@ -0,0 +1,7 @@
+// META: script=websocket.sub.js
+
+        test(function () {
+            var wsocket;
+            var spaceUrl = "web platform.test";
+            assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithSpaceInUrl(spaceUrl) });
+        }, "W3C WebSocket API - Create Secure WebSocket - Pass a URL with a space - SYNTAX_ERR should be thrown")
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-Secure-url-with-space.htm
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create Secure WebSocket - url with space</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-        test(function () {
-            var wsocket;
-            var spaceUrl = "web platform.test";
-            assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithSpaceInUrl(spaceUrl) });
-        }, "W3C WebSocket API - Create Secure WebSocket - Pass a URL with a space - SYNTAX_ERR should be thrown")
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-Secure-valid-url-array-protocols.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and array of protocol strings - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and array of protocol strings - Connection should be closed");
+
+        var wsocket = CreateWebSocket(true, false, true);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
+            wsocket.close();
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-Secure-valid-url-array-protocols.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create Secure WebSocket with valid url and array of protocols</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and array of protocol strings - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and array of protocol strings - Connection should be closed");
-
-        var wsocket = CreateWebSocket(true, false, true);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
-            wsocket.close();
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-Secure-valid-url-binaryType-blob.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - wsocket.binaryType should be set to 'blob' after connection is established - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - wsocket.binaryType should be set to 'blob' after connection is established - Connection should be closed");
+
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            assert_equals(wsocket.binaryType, "blob", "binaryType should be set to Blob");
+            wsocket.close();
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-Secure-valid-url-binaryType-blob.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create Secure WebSocket - binaryType set correctly</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - wsocket.binaryType should be set to 'blob' after connection is established - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - wsocket.binaryType should be set to 'blob' after connection is established - Connection should be closed");
-
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            assert_equals(wsocket.binaryType, "blob", "binaryType should be set to Blob");
-            wsocket.close();
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-Secure-valid-url-protocol-setCorrectly.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+            var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - protocol should be set correctly - Connection should be opened");
+            var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - Connection should be closed");
+
+            var wsocket = CreateWebSocket(true, true, false);
+            var isOpenCalled = false;
+
+            wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+                assert_equals(wsocket.protocol, "echo", "protocol should be set to echo");
+                wsocket.close();
+                isOpenCalled = true;
+                testOpen.done();
+            }), true);
+
+            wsocket.addEventListener('close', testClose.step_func(function (evt) {
+                assert_true(isOpenCalled, "WebSocket connection should be open");
+                assert_equals(evt.wasClean, true, "wasClean should be true");
+                    testClose.done();
+            }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-Secure-valid-url-protocol-setCorrectly.htm
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create Secure WebSocket and verify if protocol is set correctly after connection</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-            var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - protocol should be set correctly - Connection should be opened");
-            var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - Connection should be closed");
-
-            var wsocket = CreateWebSocket(true, true, false);
-            var isOpenCalled = false;
-
-            wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-                assert_equals(wsocket.protocol, "echo", "protocol should be set to echo");
-                wsocket.close();
-                isOpenCalled = true;
-                testOpen.done();
-            }), true);
-
-            wsocket.addEventListener('close', testClose.step_func(function (evt) {
-                assert_true(isOpenCalled, "WebSocket connection should be open");
-                assert_equals(evt.wasClean, true, "wasClean should be true");
-                    testClose.done();
-            }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-Secure-valid-url-protocol-string.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Check readyState is 1");
+        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - Connection should be closed");
+
+        var wsocket = CreateWebSocket(true, true, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
+            wsocket.close();
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-Secure-valid-url-protocol-string.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create Secure WebSocket with valid url and protocol string</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Check readyState is 1");
-        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - Connection should be closed");
-
-        var wsocket = CreateWebSocket(true, true, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
-            wsocket.close();
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-Secure-valid-url.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL  - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL - Connection should be closed");
+
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
+            wsocket.close();
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-Secure-valid-url.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create Secure WebSocket with valid url</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL  - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL - Connection should be closed");
-
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
-            wsocket.close();
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-Secure-verify-url-set-non-default-port.any.js
@@ -0,0 +1,7 @@
+// META: script=websocket.sub.js
+
+        test(function () {
+            var urlNonDefaultPort = "wss://" + __SERVER__NAME + ":" + __NEW__SECURE__PORT + "/" + __PATH;
+            var wsocket = new WebSocket(urlNonDefaultPort);
+            assert_equals(wsocket.url, urlNonDefaultPort, "wsocket.url is set correctly");
+        }, "W3C WebSocket API - Create Secure WebSocket - wsocket.url should be set correctly")
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-Secure-verify-url-set-non-default-port.htm
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create Secure WebSocket - wsocket.url is set correctly - non default port</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-        test(function () {
-            var urlNonDefaultPort = "wss://" + __SERVER__NAME + ":" + __NEW__SECURE__PORT + "/" + __PATH;
-            var wsocket = new WebSocket(urlNonDefaultPort);
-            assert_equals(wsocket.url, urlNonDefaultPort, "wsocket.url is set correctly");
-        }, "W3C WebSocket API - Create Secure WebSocket - wsocket.url should be set correctly")
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-asciiSep-protocol-string.any.js
@@ -0,0 +1,7 @@
+// META: script=websocket.sub.js
+
+            test(function () {
+                var asciiWithSep = "/echo";
+                var wsocket;
+                assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithAsciiSep(asciiWithSep) });
+            }, "W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string with an ascii separator character - SYNTAX_ERR is thrown")
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-asciiSep-protocol-string.htm
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create WebSocket - ascii protocol string with separator</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-        if(window.WebSocket) {
-            test(function () {
-                var asciiWithSep = "/echo";
-                var wsocket;
-                assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithAsciiSep(asciiWithSep) });
-            }, "W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string with an ascii separator character - SYNTAX_ERR is thrown")
-        }
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-blocked-port.any.js
@@ -0,0 +1,81 @@
+// META: script=websocket.sub.js
+
+            async_test(t => {
+              const ws = CreateWebSocketWithBlockedPort(__PORT)
+              ws.onerror = t.unreached_func()
+              ws.onopen = t.step_func_done()
+            }, 'Basic check');
+            // list of bad ports according to
+            // https://fetch.spec.whatwg.org/#port-blocking
+            [
+                1,    // tcpmux
+                7,    // echo
+                9,    // discard
+                11,   // systat
+                13,   // daytime
+                15,   // netstat
+                17,   // qotd
+                19,   // chargen
+                20,   // ftp-data
+                21,   // ftp
+                22,   // ssh
+                23,   // telnet
+                25,   // smtp
+                37,   // time
+                42,   // name
+                43,   // nicname
+                53,   // domain
+                77,   // priv-rjs
+                79,   // finger
+                87,   // ttylink
+                95,   // supdup
+                101,  // hostriame
+                102,  // iso-tsap
+                103,  // gppitnp
+                104,  // acr-nema
+                109,  // pop2
+                110,  // pop3
+                111,  // sunrpc
+                113,  // auth
+                115,  // sftp
+                117,  // uucp-path
+                119,  // nntp
+                123,  // ntp
+                135,  // loc-srv / epmap
+                139,  // netbios
+                143,  // imap2
+                179,  // bgp
+                389,  // ldap
+                465,  // smtp+ssl
+                512,  // print / exec
+                513,  // login
+                514,  // shell
+                515,  // printer
+                526,  // tempo
+                530,  // courier
+                531,  // chat
+                532,  // netnews
+                540,  // uucp
+                556,  // remotefs
+                563,  // nntp+ssl
+                587,  // smtp
+                601,  // syslog-conn
+                636,  // ldap+ssl
+                993,  // imap+ssl
+                995,  // pop3+ssl
+                2049, // nfs
+                3659, // apple-sasl
+                4045, // lockd
+                6000, // x11
+                6665, // irc (alternate)
+                6666, // irc (alternate)
+                6667, // irc (default)
+                6668, // irc (alternate)
+                6669, // irc (alternate)
+            ].forEach(blockedPort => {
+              async_test(t => {
+                const ws = CreateWebSocketWithBlockedPort(blockedPort)
+                ws.onerror = t.step_func_done()
+                ws.onopen = t.unreached_func()
+              }, "WebSocket blocked port test " + blockedPort)
+            })
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-blocked-port.htm
+++ /dev/null
@@ -1,93 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>WebSocket API - blocked port</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script>
-            async_test(t => {
-              const ws = CreateWebSocketWithBlockedPort(__PORT)
-              ws.onerror = t.unreached_func()
-              ws.onopen = t.step_func_done()
-            }, 'Basic check');
-            // list of bad ports according to
-            // https://fetch.spec.whatwg.org/#port-blocking
-            [
-                1,    // tcpmux
-                7,    // echo
-                9,    // discard
-                11,   // systat
-                13,   // daytime
-                15,   // netstat
-                17,   // qotd
-                19,   // chargen
-                20,   // ftp-data
-                21,   // ftp
-                22,   // ssh
-                23,   // telnet
-                25,   // smtp
-                37,   // time
-                42,   // name
-                43,   // nicname
-                53,   // domain
-                77,   // priv-rjs
-                79,   // finger
-                87,   // ttylink
-                95,   // supdup
-                101,  // hostriame
-                102,  // iso-tsap
-                103,  // gppitnp
-                104,  // acr-nema
-                109,  // pop2
-                110,  // pop3
-                111,  // sunrpc
-                113,  // auth
-                115,  // sftp
-                117,  // uucp-path
-                119,  // nntp
-                123,  // ntp
-                135,  // loc-srv / epmap
-                139,  // netbios
-                143,  // imap2
-                179,  // bgp
-                389,  // ldap
-                465,  // smtp+ssl
-                512,  // print / exec
-                513,  // login
-                514,  // shell
-                515,  // printer
-                526,  // tempo
-                530,  // courier
-                531,  // chat
-                532,  // netnews
-                540,  // uucp
-                556,  // remotefs
-                563,  // nntp+ssl
-                587,  // smtp
-                601,  // syslog-conn
-                636,  // ldap+ssl
-                993,  // imap+ssl
-                995,  // pop3+ssl
-                2049, // nfs
-                3659, // apple-sasl
-                4045, // lockd
-                6000, // x11
-                6665, // irc (alternate)
-                6666, // irc (alternate)
-                6667, // irc (default)
-                6668, // irc (alternate)
-                6669, // irc (alternate)
-            ].forEach(blockedPort => {
-              async_test(t => {
-                const ws = CreateWebSocketWithBlockedPort(blockedPort)
-                ws.onerror = t.step_func_done()
-                ws.onopen = t.unreached_func()
-              }, "WebSocket blocked port test " + blockedPort)
-            })
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-invalid-urls.any.js
@@ -0,0 +1,22 @@
+// META: script=websocket.sub.js
+
+        var wsocket;
+        test(function() {
+            assert_throws("SYNTAX_ERR", function () { wsocket = new WebSocket("/echo") });
+        }, "Url is /echo - should throw SYNTAX_ERR");
+
+        test(function () {
+            assert_throws("SYNTAX_ERR", function () { wsocket = new WebSocket("mailto:microsoft@microsoft.com") });
+        }, "Url is a mail address - should throw SYNTAX_ERR");
+
+        test(function () {
+            assert_throws("SYNTAX_ERR", function () { wsocket = new WebSocket("about:blank") });
+        }, "Url is about:blank - should throw SYNTAX_ERR");
+
+        test(function () {
+            assert_throws("SYNTAX_ERR", function () { wsocket = new WebSocket("?test") });
+        }, "Url is ?test - should throw SYNTAX_ERR");
+
+        test(function () {
+            assert_throws("SYNTAX_ERR", function () { wsocket = new WebSocket("#test") });
+        }, "Url is #test - should throw SYNTAX_ERR");
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-invalid-urls.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create WebSocket - pass in list of invalid urls</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-        var wsocket;
-        test(function() {
-            assert_throws("SYNTAX_ERR", function () { wsocket = new WebSocket("/echo") });
-        }, "Url is /echo - should throw SYNTAX_ERR");
-
-        test(function () {
-            assert_throws("SYNTAX_ERR", function () { wsocket = new WebSocket("mailto:microsoft@microsoft.com") });
-        }, "Url is a mail address - should throw SYNTAX_ERR");
-
-        test(function () {
-            assert_throws("SYNTAX_ERR", function () { wsocket = new WebSocket("about:blank") });
-        }, "Url is about:blank - should throw SYNTAX_ERR");
-
-        test(function () {
-            assert_throws("SYNTAX_ERR", function () { wsocket = new WebSocket("?test") });
-        }, "Url is ?test - should throw SYNTAX_ERR");
-
-        test(function () {
-            assert_throws("SYNTAX_ERR", function () { wsocket = new WebSocket("#test") });
-        }, "Url is #test - should throw SYNTAX_ERR");
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-non-absolute-url.any.js
@@ -0,0 +1,6 @@
+// META: script=websocket.sub.js
+
+        test(function () {
+            var wsocket;
+            assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketNonAbsolute() });
+        }, "W3C WebSocket API - Create WebSocket - Pass a non absolute URL - SYNTAX_ERR is thrown")
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-non-absolute-url.htm
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create WebSocket - non absolute url</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-        test(function () {
-            var wsocket;
-            assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketNonAbsolute() });
-        }, "W3C WebSocket API - Create WebSocket - Pass a non absolute URL - SYNTAX_ERR is thrown")
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-nonAscii-protocol-string.any.js
@@ -0,0 +1,7 @@
+// META: script=websocket.sub.js
+
+            test(function () {
+                var nonAsciiProtocol = "\u0080echo";
+                var wsocket;
+                assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketNonAsciiProtocol(nonAsciiProtocol) });
+            }, "W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string with non-ascii values - SYNTAX_ERR is thrown")
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-nonAscii-protocol-string.htm
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create WebSocket - non ascii protocol string</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-        if(window.WebSocket) {
-            test(function () {
-                var nonAsciiProtocol = "\u0080echo";
-                var wsocket;
-                assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketNonAsciiProtocol(nonAsciiProtocol) });
-            }, "W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string with non-ascii values - SYNTAX_ERR is thrown")
-        }
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-on-worker-shutdown.any.js
@@ -0,0 +1,27 @@
+// META: script=websocket.sub.js
+
+async_test(t => {
+  function workerCode() {
+    close();
+    var ws = new WebSocket(self.location.origin.replace('http', 'ws'));
+
+    var data = {
+      originalState: ws.readyState,
+      afterCloseState: null
+     };
+
+    ws.close();
+
+    data.afterCloseState = ws.readyState;
+    postMessage(data);
+  }
+
+  var workerBlob = new Blob([workerCode.toString() + ";workerCode();"], {type:"application/javascript"});
+
+  var w = new Worker(URL.createObjectURL(workerBlob));
+  w.onmessage = function(e) {
+    assert_equals(e.data.originalState, WebSocket.CONNECTING, "WebSocket created on worker shutdown is in connecting state.");
+    assert_equals(e.data.afterCloseState, WebSocket.CLOSING, "Closed WebSocket created on worker shutdown is in closing state.");
+    t.done();
+  }
+}, 'WebSocket created after a worker self.close()');
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-on-worker-shutdown.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create WebSocket - on a worker after self.close()</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-async_test(t => {
-  function workerCode() {
-    close();
-    var ws = new WebSocket(self.location.origin.replace('http', 'ws'));
-
-    var data = {
-      originalState: ws.readyState,
-      afterCloseState: null
-     };
-
-    ws.close();
-
-    data.afterCloseState = ws.readyState;
-    postMessage(data);
-  }
-
-  var workerBlob = new Blob([workerCode.toString() + ";workerCode();"], {type:"application/javascript"});
-
-  var w = new Worker(URL.createObjectURL(workerBlob));
-  w.onmessage = function(e) {
-    assert_equals(e.data.originalState, WebSocket.CONNECTING, "WebSocket created on worker shutdown is in connecting state.");
-    assert_equals(e.data.afterCloseState, WebSocket.CLOSING, "Closed WebSocket created on worker shutdown is in closing state.");
-    t.done();
-  }
-}, 'WebSocket created after a worker self.close()');
-
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-protocol-with-space.any.js
@@ -0,0 +1,6 @@
+// META: script=websocket.sub.js
+
+        test(function () {
+            var wsocket;
+            assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithSpaceInProtocol("ec ho") });
+        }, "W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string with a space in it - SYNTAX_ERR is thrown")
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-protocol-with-space.htm
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create WebSocket - protocol with space</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-        test(function () {
-            var wsocket;
-            assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithSpaceInProtocol("ec ho") });
-        }, "W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string with a space in it - SYNTAX_ERR is thrown")
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-protocols-repeated-case-insensitive.any.js
@@ -0,0 +1,6 @@
+// META: script=websocket.sub.js
+
+        test(function () {
+            var wsocket;
+            assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithRepeatedProtocolsCaseInsensitive() });
+        }, "W3C WebSocket API - Create WebSocket - Pass a valid URL and an array of protocol strings with repeated values but different case - SYNTAX_ERR is thrown")
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-protocols-repeated-case-insensitive.htm
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create WebSocket - repeated protocols with different case</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-        test(function () {
-            var wsocket;
-            assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithRepeatedProtocolsCaseInsensitive() });
-        }, "W3C WebSocket API - Create WebSocket - Pass a valid URL and an array of protocol strings with repeated values but different case - SYNTAX_ERR is thrown")
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-protocols-repeated.any.js
@@ -0,0 +1,6 @@
+// META: script=websocket.sub.js
+
+        test(function () {
+            var wsocket;
+            assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithRepeatedProtocols() });
+        }, "W3C WebSocket API - Create WebSocket - Pass a valid URL and an array of protocol strings with repeated values - SYNTAX_ERR is thrown")
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-protocols-repeated.htm
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create WebSocket - repeated protocols</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-        test(function () {
-            var wsocket;
-            assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithRepeatedProtocols() });
-        }, "W3C WebSocket API - Create WebSocket - Pass a valid URL and an array of protocol strings with repeated values - SYNTAX_ERR is thrown")
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-valid-url-array-protocols.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL and array of protocol strings - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL and array of protocol strings - Connection should be closed");
+
+        var wsocket = CreateWebSocket(false, false, true);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
+            wsocket.close();
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-valid-url-array-protocols.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create WebSocket with valid url and array of protocols</title>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL and array of protocol strings - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL and array of protocol strings - Connection should be closed");
-
-        var wsocket = CreateWebSocket(false, false, true);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
-            wsocket.close();
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-valid-url-protocol-empty.any.js
@@ -0,0 +1,7 @@
+// META: script=websocket.sub.js
+
+        test(function () {
+            var wsocket = CreateWebSocket(false, true, false);
+            assert_equals(wsocket.protocol, "", "protocol should be empty");
+            wsocket.close();
+        }, "W3C WebSocket API - Create WebSocket - wsocket.protocol should be empty before connection is established")
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-valid-url-protocol-empty.htm
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create WebSocket - wsocket.protocol is empty before connection is established</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-        test(function () {
-            var wsocket = CreateWebSocket(false, true, false);
-            assert_equals(wsocket.protocol, "", "protocol should be empty");
-            wsocket.close();
-        }, "W3C WebSocket API - Create WebSocket - wsocket.protocol should be empty before connection is established")
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-valid-url-protocol.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string - Connection should be closed");
+
+        var wsocket = CreateWebSocket(false, true, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
+            wsocket.close();
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-valid-url-protocol.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create WebSocket with a valid url and protocol string</title>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string - Connection should be closed");
-
-        var wsocket = CreateWebSocket(false, true, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
-            wsocket.close();
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-valid-url.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL - Connection should be closed");
+
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
+            wsocket.close();
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-valid-url.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create WebSocket with valid url</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL - Connection should be closed");
-
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
-            wsocket.close();
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-verify-url-set-non-default-port.any.js
@@ -0,0 +1,7 @@
+// META: script=websocket.sub.js
+
+        test(function () {
+            var urlNonDefaultPort = "ws://" + __SERVER__NAME + ":" + __NEW__PORT + "/" + __PATH;
+            var wsocket = new WebSocket(urlNonDefaultPort);
+            assert_equals(wsocket.url, urlNonDefaultPort, "wsocket.url is set correctly");
+        }, "W3C WebSocket API - Create WebSocket - wsocket.url should be set correctly");
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-verify-url-set-non-default-port.htm
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create WebSocket - wsocket.url is set correctly - non default port</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-        test(function () {
-            var urlNonDefaultPort = "ws://" + __SERVER__NAME + ":" + __NEW__PORT + "/" + __PATH;
-            var wsocket = new WebSocket(urlNonDefaultPort);
-            assert_equals(wsocket.url, urlNonDefaultPort, "wsocket.url is set correctly");
-        }, "W3C WebSocket API - Create WebSocket - wsocket.url should be set correctly");
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Create-wrong-scheme.any.js
@@ -0,0 +1,6 @@
+// META: script=websocket.sub.js
+
+        test(function () {
+            var wsocket;
+            assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketNonWsScheme() });
+        }, "W3C WebSocket API - Create WebSocket - Pass a URL with a non ws/wss scheme - SYNTAX_ERR is thrown")
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Create-wrong-scheme.htm
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create WebSocket - non ws/wss scheme in url</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-        test(function () {
-            var wsocket;
-            assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketNonWsScheme() });
-        }, "W3C WebSocket API - Create WebSocket - Pass a URL with a non ws/wss scheme - SYNTAX_ERR is thrown")
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Close-1000-reason.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
+
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.close(1000, "Clean Close");
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
+            assert_equals(evt.wasClean, true, "wasClean should be TRUE");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Close-1000-reason.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close Secure WebSocket - Code is 1000 and reason</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
-
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.close(1000, "Clean Close");
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
-            assert_equals(evt.wasClean, true, "wasClean should be TRUE");
-            testClose.done();
-        }), true);
-
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Close-1000-verify-code.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - event.code == 1000 and event.reason = 'Clean Close'");
+
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.close(1000, "Clean Close");
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.code, 1000, "CloseEvent.code should be 1000");
+            assert_equals(evt.reason, "Clean Close", "CloseEvent.reason should be the same as the reason sent in close");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Close-1000-verify-code.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close Secure WebSocket - Code is 1000 - verify code in CloseEvent is 1000</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - event.code == 1000 and event.reason = 'Clean Close'");
-
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.close(1000, "Clean Close");
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.code, 1000, "CloseEvent.code should be 1000");
-            assert_equals(evt.reason, "Clean Close", "CloseEvent.reason should be the same as the reason sent in close");
-            testClose.done();
-        }), true);
-
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Close-1000.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000) - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
+
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.close(1000);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
+            assert_equals(evt.wasClean, true, "wasClean should be TRUE");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Close-1000.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close Secure WebSocket - Code is 1000</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000) - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
-
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.close(1000);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
-            assert_equals(evt.wasClean, true, "wasClean should be TRUE");
-            testClose.done();
-        }), true);
-
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Close-1005-verify-code.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close() - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close() - return close code is 1005 - Connection should be closed");
+
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.close();
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.code, 1005, "CloseEvent.code should be 1005");
+            assert_equals(evt.reason, "", "CloseEvent.reason should be empty");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Close-1005-verify-code.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close Secure WebSocket - verify return code is 1005</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close() - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close() - return close code is 1005 - Connection should be closed");
-
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.close();
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.code, 1005, "CloseEvent.code should be 1005");
-            assert_equals(evt.reason, "", "CloseEvent.reason should be empty");
-            testClose.done();
-        }), true);
-
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Close-1005.any.js
@@ -0,0 +1,11 @@
+// META: script=websocket.sub.js
+
+        var test = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1005) - see '7.1.5.  The WebSocket Connection Close Code' in http://www.ietf.org/rfc/rfc6455.txt");
+
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', test.step_func(function (evt) {
+            assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close(1005, "1005 - reserved code") });
+            test.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Close-1005.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close Secure WebSocket - Code is 1005</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var test = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1005) - see '7.1.5.  The WebSocket Connection Close Code' in http://www.ietf.org/rfc/rfc6455.txt");
-
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', test.step_func(function (evt) {
-            assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close(1005, "1005 - reserved code") });
-            test.done();
-        }), true);
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Close-2999-reason.any.js
@@ -0,0 +1,10 @@
+// META: script=websocket.sub.js
+
+        var test = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(2999, reason) - INVALID_ACCESS_ERR is thrown");
+
+        var wsocket = CreateWebSocket(true, false, false);
+
+        wsocket.addEventListener('open', test.step_func(function (evt) {
+            assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close(2999, "Close not in range 3000-4999") });
+            test.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Close-2999-reason.htm
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close Secure WebSocket - Code is 2999 and reason</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var test = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(2999, reason) - INVALID_ACCESS_ERR is thrown");
-
-        var wsocket = CreateWebSocket(true, false, false);
-
-        wsocket.addEventListener('open', test.step_func(function (evt) {
-            assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close(2999, "Close not in range 3000-4999") });
-            test.done();
-        }), true);
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Close-3000-reason.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
+
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.close(3000, "Clean Close with code - 3000");
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
+            assert_equals(evt.wasClean, true, "wasClean should be TRUE");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Close-3000-reason.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close Secure WebSocket - Code is 3000 and reason</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
-
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.close(3000, "Clean Close with code - 3000");
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
-            assert_equals(evt.wasClean, true, "wasClean should be TRUE");
-            testClose.done();
-        }), true);
-
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Close-3000-verify-code.any.js
@@ -0,0 +1,19 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - verify return code is 3000 - Connection should be closed");
+
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.close(3000, "Clean Close");
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.code, 3000, "CloseEvent.code should be 3000");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Close-3000-verify-code.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close Secure WebSocket - Code is 3000 - verify code in CloseEvent is 3000</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - verify return code is 3000 - Connection should be closed");
-
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.close(3000, "Clean Close");
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.code, 3000, "CloseEvent.code should be 3000");
-            testClose.done();
-        }), true);
-
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Close-4999-reason.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(4999, reason) - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(4999, reason) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
+
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.close(3000, "Clean Close with code - 4999");
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
+            assert_equals(evt.wasClean, true, "wasClean should be TRUE");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Close-4999-reason.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close Secure WebSocket - Code is 4999 and reason</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(4999, reason) - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(4999, reason) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
-
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.close(3000, "Clean Close with code - 4999");
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
-            assert_equals(evt.wasClean, true, "wasClean should be TRUE");
-            testClose.done();
-        }), true);
-
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Close-Reason-124Bytes.any.js
@@ -0,0 +1,13 @@
+// META: script=websocket.sub.js
+
+        var test = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(code, 'reason more than 123 bytes') - SYNTAX_ERR is thrown");
+
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', test.step_func(function (evt) {
+            var reason = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123";
+            assert_equals(reason.length, 124);
+            assert_throws("SYNTAX_ERR", function () { wsocket.close(1000, reason) });
+            test.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Close-Reason-124Bytes.htm
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close Secure WebSocket - Reason is more than 123 bytes long</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var test = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(code, 'reason more than 123 bytes') - SYNTAX_ERR is thrown");
-
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', test.step_func(function (evt) {
-            var reason = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123";
-            assert_equals(reason.length, 124);
-            assert_throws("SYNTAX_ERR", function () { wsocket.close(1000, reason) });
-            test.done();
-        }), true);
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Close-Reason-Unpaired-surrogates.any.js
@@ -0,0 +1,21 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get opened");
+        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get closed");
+
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+        var replacementChar = "\uFFFD";
+        var reason = "\uD807";
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.close(1000, reason);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be opened");
+            assert_equals(evt.reason, replacementChar, "reason replaced with replacement character");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Close-Reason-Unpaired-surrogates.htm
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close Secure WebSocket - Reason with unpaired surrogates</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get opened");
-        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get closed");
-
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-        var replacementChar = "\uFFFD";
-        var reason = "\uD807";
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.close(1000, reason);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be opened");
-            assert_equals(evt.reason, replacementChar, "reason replaced with replacement character");
-            testClose.done();
-        }), true);
-
-    </script>
-
-</body>
-</html>
-
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Close-onlyReason.any.js
@@ -0,0 +1,10 @@
+// META: script=websocket.sub.js
+
+        var test = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(only reason) - INVALID_ACCESS_ERR is thrown");
+
+        var wsocket = CreateWebSocket(true, false, false);
+
+        wsocket.addEventListener('open', test.step_func(function (evt) {
+            assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close("Close with only reason") });
+            test.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Close-onlyReason.htm
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close Secure WebSocket - Only reason</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var test = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(only reason) - INVALID_ACCESS_ERR is thrown");
-
-        var wsocket = CreateWebSocket(true, false, false);
-
-        wsocket.addEventListener('open', test.step_func(function (evt) {
-            assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close("Close with only reason") });
-            test.done();
-        }), true);
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Close-readyState-Closed.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
+
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.close();
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
+            assert_equals(evt.wasClean, true, "wasClean should be TRUE");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Close-readyState-Closed.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close Secure WebSocket - verify readyState is 3 when onclose is fired</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
-
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.close();
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
-            assert_equals(evt.wasClean, true, "wasClean should be TRUE");
-            testClose.done();
-        }), true);
-
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Close-readyState-Closing.any.js
@@ -0,0 +1,12 @@
+// META: script=websocket.sub.js
+
+        var test = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - readyState should be in CLOSING state just before onclose is called");
+
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', test.step_func(function (evt) {
+            wsocket.close();
+            assert_equals(wsocket.readyState, 2, "readyState should be 2(CLOSING)");
+            test.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Close-readyState-Closing.htm
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close Secure WebSocket - verify readyState is 2 before onclose is fired</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var test = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - readyState should be in CLOSING state just before onclose is called");
-
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', test.step_func(function (evt) {
-            wsocket.close();
-            assert_equals(wsocket.readyState, 2, "readyState should be 2(CLOSING)");
-            test.done();
-        }), true);
-
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Close-server-initiated-close.any.js
@@ -0,0 +1,20 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Server initiated Close - Client sends back a CLOSE - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Server initiated Close - Client sends back a CLOSE - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
+
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.send("Goodbye");
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
+            assert_equals(evt.wasClean, true, "wasClean should be TRUE");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Close-server-initiated-close.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close Secure WebSocket - Server Initiated close</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Server initiated Close - Client sends back a CLOSE - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Server initiated Close - Client sends back a CLOSE - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
-
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.send("Goodbye");
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
-            assert_equals(evt.wasClean, true, "wasClean should be TRUE");
-            testClose.done();
-        }), true);
-
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Close-undefined.any.js
@@ -0,0 +1,11 @@
+// META: script=websocket.sub.js
+
+        var test = async_test();
+
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', test.step_func(function (evt) {
+            wsocket.close(undefined);
+            test.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Close-undefined.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Close Secure WebSocket - Code is undefined</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var test = async_test();
-
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', test.step_func(function (evt) {
-            wsocket.close(undefined);
-            test.done();
-        }), true);
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Send-65K-data.any.js
@@ -0,0 +1,31 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send  65K data on a Secure WebSocket - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send 65K data on a Secure WebSocket - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send 65K data on a Secure WebSocket - Connection should be closed");
+
+        var data = "";
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            for (var i = 0; i < 65000; i++) {
+                data = data + "c";
+            }
+            wsocket.send(data);
+            assert_equals(data.length, wsocket.bufferedAmount);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            assert_equals(evt.data, data);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Send-65K-data.htm
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send 65K data - Secure WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send  65K data on a Secure WebSocket - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send 65K data on a Secure WebSocket - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send 65K data on a Secure WebSocket - Connection should be closed");
-
-        var data = "";
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            for (var i = 0; i < 65000; i++) {
-                data = data + "c";
-            }
-            wsocket.send(data);
-            assert_equals(data.length, wsocket.bufferedAmount);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            assert_equals(evt.data, data);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Send-binary-65K-arraybuffer.any.js
@@ -0,0 +1,31 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send 65K binary data on a Secure WebSocket - ArrayBuffer - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send 65K binary data on a Secure WebSocket - ArrayBuffer - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send 65K binary data on a Secure WebSocket - ArrayBuffer - Connection should be closed");
+
+        var data = "";
+        var datasize = 65000;
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.binaryType = "arraybuffer";
+            data = new ArrayBuffer(datasize);
+            wsocket.send(data);
+            assert_equals(datasize, wsocket.bufferedAmount);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            assert_equals(evt.data.byteLength, datasize);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-65K-arraybuffer.htm
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send 65K binary data - ArrayBuffer - Secure WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send 65K binary data on a Secure WebSocket - ArrayBuffer - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send 65K binary data on a Secure WebSocket - ArrayBuffer - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send 65K binary data on a Secure WebSocket - ArrayBuffer - Connection should be closed");
-
-        var data = "";
-        var datasize = 65000;
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.binaryType = "arraybuffer";
-            data = new ArrayBuffer(datasize);
-            wsocket.send(data);
-            assert_equals(datasize, wsocket.bufferedAmount);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            assert_equals(evt.data.byteLength, datasize);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Send-binary-arraybuffer.any.js
@@ -0,0 +1,31 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - ArrayBuffer - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - ArrayBuffer - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - ArrayBuffer - Connection should be closed");
+
+        var data = "";
+        var datasize = 15;
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.binaryType = "arraybuffer";
+            data = new ArrayBuffer(datasize);
+            wsocket.send(data);
+            assert_equals(datasize, wsocket.bufferedAmount);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            assert_equals(evt.data.byteLength, datasize);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybuffer.htm
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send binary data - ArrayBuffer - Secure WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - ArrayBuffer - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - ArrayBuffer - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - ArrayBuffer - Connection should be closed");
-
-        var data = "";
-        var datasize = 15;
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.binaryType = "arraybuffer";
-            data = new ArrayBuffer(datasize);
-            wsocket.send(data);
-            assert_equals(datasize, wsocket.bufferedAmount);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            assert_equals(evt.data.byteLength, datasize);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-float32.any.js
@@ -0,0 +1,38 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float32Array - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float32Array - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float32Array - Connection should be closed");
+
+        var data = "";
+        var datasize = 8;
+        var view;
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.binaryType = "arraybuffer";
+            data = new ArrayBuffer(datasize);
+            view = new Float32Array(data);
+            for(var i = 0; i < 2; i++) {
+                view[i] = i;
+            }
+            wsocket.send(view);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            var resultView = new Float32Array(evt.data);
+            for(var i = 0; i < resultView.length; i++) {
+                assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
+            }
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-float32.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send binary data - ArrayBufferView - Float32Array - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float32Array - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float32Array - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float32Array - Connection should be closed");
-
-        var data = "";
-        var datasize = 8;
-        var view;
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.binaryType = "arraybuffer";
-            data = new ArrayBuffer(datasize);
-            view = new Float32Array(data);
-            for(var i = 0; i < 2; i++) {
-                view[i] = i;
-            }
-            wsocket.send(view);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            var resultView = new Float32Array(evt.data);
-            for(var i = 0; i < resultView.length; i++) {
-                assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
-            }
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-float64.any.js
@@ -0,0 +1,38 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float64Array - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float64Array - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float64Array - Connection should be closed");
+
+        var data = "";
+        var datasize = 8;
+        var view;
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.binaryType = "arraybuffer";
+            data = new ArrayBuffer(datasize);
+            view = new Float64Array(data);
+            for (var i = 0; i < 1; i++) {
+                view[i] = i;
+            }
+            wsocket.send(view);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            var resultView = new Float64Array(evt.data);
+            for(var i = 0; i < resultView.length; i++) {
+                assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
+            }
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-float64.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send binary data - ArrayBufferView - Float32Array - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float64Array - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float64Array - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float64Array - Connection should be closed");
-
-        var data = "";
-        var datasize = 8;
-        var view;
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.binaryType = "arraybuffer";
-            data = new ArrayBuffer(datasize);
-            view = new Float64Array(data);
-            for (var i = 0; i < 1; i++) {
-                view[i] = i;
-            }
-            wsocket.send(view);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            var resultView = new Float64Array(evt.data);
-            for(var i = 0; i < resultView.length; i++) {
-                assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
-            }
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-int32.any.js
@@ -0,0 +1,38 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int32Array - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int32Array - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int32Array - Connection should be closed");
+
+        var data = "";
+        var datasize = 8;
+        var view;
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.binaryType = "arraybuffer";
+            data = new ArrayBuffer(datasize);
+            view = new Int32Array(data);
+            for(var i = 0; i < 2; i++) {
+                view[i] = i;
+            }
+            wsocket.send(view);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            var resultView = new Int32Array(evt.data);
+            for(var i = 0; i < resultView.length; i++) {
+                assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
+            }
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-int32.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send binary data - ArrayBufferView - Int32Array - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int32Array - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int32Array - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int32Array - Connection should be closed");
-
-        var data = "";
-        var datasize = 8;
-        var view;
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.binaryType = "arraybuffer";
-            data = new ArrayBuffer(datasize);
-            view = new Int32Array(data);
-            for(var i = 0; i < 2; i++) {
-                view[i] = i;
-            }
-            wsocket.send(view);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            var resultView = new Int32Array(evt.data);
-            for(var i = 0; i < resultView.length; i++) {
-                assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
-            }
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint16-offset-length.any.js
@@ -0,0 +1,38 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint16Array with offset and length - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint16Array with offset and length - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint16Array with offset and length - Connection should be closed");
+
+        var data = "";
+        var datasize = 8;
+        var view;
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.binaryType = "arraybuffer";
+            data = new ArrayBuffer(datasize);
+            view = new Uint16Array(data, 2, 2);
+            for(var i = 0; i < 4; i++) {
+                view[i] = i;
+            }
+            wsocket.send(view);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            var resultView = new Uint16Array(evt.data);
+            for(var i = 0; i < resultView.length; i++) {
+                assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
+            }
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint16-offset-length.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send binary data - ArrayBufferView - Uint16Array with offset and length - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint16Array with offset and length - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint16Array with offset and length - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint16Array with offset and length - Connection should be closed");
-
-        var data = "";
-        var datasize = 8;
-        var view;
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.binaryType = "arraybuffer";
-            data = new ArrayBuffer(datasize);
-            view = new Uint16Array(data, 2, 2);
-            for(var i = 0; i < 4; i++) {
-                view[i] = i;
-            }
-            wsocket.send(view);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            var resultView = new Uint16Array(evt.data);
-            for(var i = 0; i < resultView.length; i++) {
-                assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
-            }
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint32-offset.any.js
@@ -0,0 +1,38 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint32Array with offset - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint32Array with offset - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint32Array with offset - Connection should be closed");
+
+        var data = "";
+        var datasize = 8;
+        var view;
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.binaryType = "arraybuffer";
+            data = new ArrayBuffer(datasize);
+            view = new Uint32Array(data, 0);
+            for(var i = 0; i < 2; i++) {
+                view[i] = i;
+            }
+            wsocket.send(view);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            var resultView = new Uint32Array(evt.data);
+            for(var i = 0; i < resultView.length; i++) {
+                assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
+            }
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint32-offset.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send binary data - ArrayBufferView - Uint32Array with offset - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint32Array with offset - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint32Array with offset - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint32Array with offset - Connection should be closed");
-
-        var data = "";
-        var datasize = 8;
-        var view;
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.binaryType = "arraybuffer";
-            data = new ArrayBuffer(datasize);
-            view = new Uint32Array(data, 0);
-            for(var i = 0; i < 2; i++) {
-                view[i] = i;
-            }
-            wsocket.send(view);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            var resultView = new Uint32Array(evt.data);
-            for(var i = 0; i < resultView.length; i++) {
-                assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
-            }
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint8-offset-length.any.js
@@ -0,0 +1,38 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset and length - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset and length - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset and length - Connection should be closed");
+
+        var data = "";
+        var datasize = 8;
+        var view;
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.binaryType = "arraybuffer";
+            data = new ArrayBuffer(datasize);
+            view = new Uint8Array(data, 2, 4);
+            for(var i = 0; i < 8; i++) {
+                view[i] = i;
+            }
+            wsocket.send(view);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            var resultView = new Uint8Array(evt.data);
+            for(var i = 0; i < resultView.length; i++) {
+                assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
+            }
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint8-offset-length.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send binary data - ArrayBufferView - Uint8Array with offset and length - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset and length - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset and length - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset and length - Connection should be closed");
-
-        var data = "";
-        var datasize = 8;
-        var view;
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.binaryType = "arraybuffer";
-            data = new ArrayBuffer(datasize);
-            view = new Uint8Array(data, 2, 4);
-            for(var i = 0; i < 8; i++) {
-                view[i] = i;
-            }
-            wsocket.send(view);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            var resultView = new Uint8Array(evt.data);
-            for(var i = 0; i < resultView.length; i++) {
-                assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
-            }
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint8-offset.any.js
@@ -0,0 +1,38 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset - Connection should be closed");
+
+        var data = "";
+        var datasize = 8;
+    var view;
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.binaryType = "arraybuffer";
+            data = new ArrayBuffer(datasize);
+        view = new Uint8Array(data, 2);
+        for(var i = 0; i < 8; i++) {
+        view[i] = i;
+        }
+            wsocket.send(view);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            var resultView = new Uint8Array(evt.data);
+        for(var i = 0; i < resultView.length; i++) {
+            assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
+        }
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint8-offset.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send binary data - ArrayBufferView - Uint8Array with offset - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset - Connection should be closed");
-
-        var data = "";
-        var datasize = 8;
-    var view;
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.binaryType = "arraybuffer";
-            data = new ArrayBuffer(datasize);
-        view = new Uint8Array(data, 2);
-        for(var i = 0; i < 8; i++) {
-        view[i] = i;
-        }
-            wsocket.send(view);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            var resultView = new Uint8Array(evt.data);
-        for(var i = 0; i < resultView.length; i++) {
-            assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
-        }
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Send-binary-blob.any.js
@@ -0,0 +1,34 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - Blob - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - Blob - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - Blob - Connection should be closed");
+
+        var data = "";
+        var datasize = 65000;
+        var isOpenCalled = false;
+
+        var wsocket = CreateWebSocket(true, false, false);
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.binaryType = "blob";
+            for (var i = 0; i < datasize; i++)
+                data += String.fromCharCode(0);
+            data = new Blob([data]);
+            isOpenCalled = true;
+            wsocket.send(data);
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            assert_true(evt.data instanceof Blob);
+            assert_equals(evt.data.size, datasize);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_true(evt.wasClean, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-blob.htm
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send binary data - Blob - Secure WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - Blob - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - Blob - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - Blob - Connection should be closed");
-
-        var data = "";
-        var datasize = 65000;
-        var isOpenCalled = false;
-
-        var wsocket = CreateWebSocket(true, false, false);
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.binaryType = "blob";
-            for (var i = 0; i < datasize; i++)
-                data += String.fromCharCode(0);
-            data = new Blob([data]);
-            isOpenCalled = true;
-            wsocket.send(data);
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            assert_true(evt.data instanceof Blob);
-            assert_equals(evt.data.size, datasize);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_true(evt.wasClean, "wasClean should be true");
-            testClose.done();
-        }), true);
-
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Send-data.any.js
@@ -0,0 +1,28 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send  data on a Secure WebSocket - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send data on a Secure WebSocket - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send data on a Secure WebSocket - Connection should be closed");
+
+        var data = "Message to send";
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.send(data);
+            assert_equals(data.length, wsocket.bufferedAmount);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            assert_equals(evt.data, data);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Send-data.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send data - Secure WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send  data on a Secure WebSocket - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send data on a Secure WebSocket - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send data on a Secure WebSocket - Connection should be closed");
-
-        var data = "Message to send";
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.send(data);
-            assert_equals(data.length, wsocket.bufferedAmount);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            assert_equals(evt.data, data);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Send-null.any.js
@@ -0,0 +1,30 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send null data on a Secure WebSocket - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send null data on a Secure WebSocket - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send null data on a Secure WebSocket - Connection should be closed");
+
+        var data = null;
+        var nullReturned = false;
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.send(data);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            if ("null" == evt.data || "" == evt.data)
+                nullReturned = true;
+            assert_true(nullReturned);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Send-null.htm
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send null data - Secure WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send null data on a Secure WebSocket - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send null data on a Secure WebSocket - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send null data on a Secure WebSocket - Connection should be closed");
-
-        var data = null;
-        var nullReturned = false;
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.send(data);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            if ("null" == evt.data || "" == evt.data)
-                nullReturned = true;
-            assert_true(nullReturned);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Send-paired-surrogates.any.js
@@ -0,0 +1,28 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send paired surrogates data on a Secure WebSocket - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send paired surrogates data on a Secure WebSocket - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send paired surrogates data on a Secure WebSocket - Connection should be closed");
+
+        var data = "\uD801\uDC07";
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.send(data);
+            assert_equals(data.length * 2, wsocket.bufferedAmount);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            assert_equals(evt.data, data);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Send-paired-surrogates.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send (paired surrogates) data - Secure WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send paired surrogates data on a Secure WebSocket - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send paired surrogates data on a Secure WebSocket - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send paired surrogates data on a Secure WebSocket - Connection should be closed");
-
-        var data = "\uD801\uDC07";
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.send(data);
-            assert_equals(data.length * 2, wsocket.bufferedAmount);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            assert_equals(evt.data, data);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Send-unicode-data.any.js
@@ -0,0 +1,28 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send  unicode data on a Secure WebSocket - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send unicode data on a Secure WebSocket - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send unicode data on a Secure WebSocket - Connection should be closed");
+
+        var data = "¥¥¥¥¥¥";
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.send(data);
+            assert_equals(data.length * 2, wsocket.bufferedAmount);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            assert_equals(evt.data, data);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Send-unicode-data.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send unicode data - Secure WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send  unicode data on a Secure WebSocket - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send unicode data on a Secure WebSocket - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send unicode data on a Secure WebSocket - Connection should be closed");
-
-        var data = "¥¥¥¥¥¥";
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.send(data);
-            assert_equals(data.length * 2, wsocket.bufferedAmount);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            assert_equals(evt.data, data);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Secure-Send-unpaired-surrogates.any.js
@@ -0,0 +1,28 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send unpaired surrogates on a Secure WebSocket - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send unpaired surrogates on a Secure WebSocket - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send unpaired surrogates on a Secure WebSocket - Connection should be closed");
+
+        var data = "\uD807";
+        var replacementChar = "\uFFFD";
+        var wsocket = CreateWebSocket(true, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.send(data);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            assert_equals(evt.data, replacementChar);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Secure-Send-unpaired-surrogates.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send unpaired surrogates - Secure WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send unpaired surrogates on a Secure WebSocket - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send unpaired surrogates on a Secure WebSocket - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send unpaired surrogates on a Secure WebSocket - Connection should be closed");
-
-        var data = "\uD807";
-        var replacementChar = "\uFFFD";
-        var wsocket = CreateWebSocket(true, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.send(data);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            assert_equals(evt.data, replacementChar);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Send-0byte-data.any.js
@@ -0,0 +1,28 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send 0 byte data on a WebSocket - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send 0 byte data on a WebSocket - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send 0 byte data on a WebSocket - Connection should be closed");
+
+        var data = "";
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.send(data);
+            assert_equals(data.length, wsocket.bufferedAmount);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            assert_equals(evt.data, data);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Send-0byte-data.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send 0 byte data - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send 0 byte data on a WebSocket - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send 0 byte data on a WebSocket - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send 0 byte data on a WebSocket - Connection should be closed");
-
-        var data = "";
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.send(data);
-            assert_equals(data.length, wsocket.bufferedAmount);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            assert_equals(evt.data, data);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Send-65K-data.any.js
@@ -0,0 +1,31 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send 65K data on a WebSocket -  Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send 65K data on a WebSocket - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send 65K data on a WebSocket - Connection should be closed");
+
+        var data = "";
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            for (var i = 0; i < 65000; i++) {
+                data = data + "c";
+            }
+            wsocket.send(data);
+            assert_equals(data.length, wsocket.bufferedAmount);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            assert_equals(evt.data, data);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Send-65K-data.htm
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send 65K data - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send 65K data on a WebSocket -  Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send 65K data on a WebSocket - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send 65K data on a WebSocket - Connection should be closed");
-
-        var data = "";
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            for (var i = 0; i < 65000; i++) {
-                data = data + "c";
-            }
-            wsocket.send(data);
-            assert_equals(data.length, wsocket.bufferedAmount);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            assert_equals(evt.data, data);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Send-Unpaired-Surrogates.any.js
@@ -0,0 +1,28 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send unpaired surrogates on a WebSocket - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send unpaired surrogates on a WebSocket - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send unpaired surrogates on a WebSocket - Connection should be closed");
+
+        var data = "\uD807";
+        var replacementChar = "\uFFFD";
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.send(data);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            assert_equals(evt.data, replacementChar);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Send-Unpaired-Surrogates.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send unpaired surrogates - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send unpaired surrogates on a WebSocket - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send unpaired surrogates on a WebSocket - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send unpaired surrogates on a WebSocket - Connection should be closed");
-
-        var data = "\uD807";
-        var replacementChar = "\uFFFD";
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.send(data);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            assert_equals(evt.data, replacementChar);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Send-before-open.any.js
@@ -0,0 +1,6 @@
+// META: script=websocket.sub.js
+
+        test(function () {
+            var wsocket = CreateWebSocket(false, false, false);
+            assert_throws("INVALID_STATE_ERR", function () { wsocket.send("Message to send") });
+        }, "W3C WebSocket API - Send data on a WebSocket before connection is opened - INVALID_STATE_ERR is returned")
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Send-before-open.htm
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send WebSocket - Send before connection in established</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-        test(function () {
-            var wsocket = CreateWebSocket(false, false, false);
-            assert_throws("INVALID_STATE_ERR", function () { wsocket.send("Message to send") });
-        }, "W3C WebSocket API - Send data on a WebSocket before connection is opened - INVALID_STATE_ERR is returned")
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Send-binary-65K-arraybuffer.any.js
@@ -0,0 +1,31 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send 65K binary data on a WebSocket - ArrayBuffer - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send 65K binary data on a WebSocket - ArrayBuffer - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send 65K binary data on a WebSocket - ArrayBuffer - Connection should be closed");
+
+        var data = "";
+        var datasize = 65000;
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.binaryType = "arraybuffer";
+            data = new ArrayBuffer(datasize);
+            wsocket.send(data);
+            assert_equals(datasize, wsocket.bufferedAmount);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            assert_equals(evt.data.byteLength, datasize);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Send-binary-65K-arraybuffer.htm
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send 65K binary data - ArrayBuffer - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send 65K binary data on a WebSocket - ArrayBuffer - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send 65K binary data on a WebSocket - ArrayBuffer - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send 65K binary data on a WebSocket - ArrayBuffer - Connection should be closed");
-
-        var data = "";
-        var datasize = 65000;
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.binaryType = "arraybuffer";
-            data = new ArrayBuffer(datasize);
-            wsocket.send(data);
-            assert_equals(datasize, wsocket.bufferedAmount);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            assert_equals(evt.data.byteLength, datasize);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Send-binary-arraybuffer.any.js
@@ -0,0 +1,31 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBuffer - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBuffer - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBuffer - Connection should be closed");
+
+        var data = "";
+        var datasize = 15;
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.binaryType = "arraybuffer";
+            data = new ArrayBuffer(datasize);
+            wsocket.send(data);
+            assert_equals(datasize, wsocket.bufferedAmount);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            assert_equals(evt.data.byteLength, datasize);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Send-binary-arraybuffer.htm
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send binary data - ArrayBuffer - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBuffer - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBuffer - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBuffer - Connection should be closed");
-
-        var data = "";
-        var datasize = 15;
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.binaryType = "arraybuffer";
-            data = new ArrayBuffer(datasize);
-            wsocket.send(data);
-            assert_equals(datasize, wsocket.bufferedAmount);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            assert_equals(evt.data.byteLength, datasize);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Send-binary-arraybufferview-int16-offset.any.js
@@ -0,0 +1,38 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int16Array with offset - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int16Array with offset - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int16Array with offset - Connection should be closed");
+
+        var data = "";
+        var datasize = 8;
+        var view;
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.binaryType = "arraybuffer";
+            data = new ArrayBuffer(datasize);
+            view = new Int16Array(data, 2);
+            for(var i = 0; i < 4; i++) {
+                view[i] = i;
+            }
+            wsocket.send(view);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            var resultView = new Int16Array(evt.data);
+            for(var i = 0; i < resultView.length; i++) {
+                assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
+            }
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Send-binary-arraybufferview-int16-offset.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send binary data - ArrayBufferView - Int16Array with offset - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int16Array with offset - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int16Array with offset - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int16Array with offset - Connection should be closed");
-
-        var data = "";
-        var datasize = 8;
-        var view;
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.binaryType = "arraybuffer";
-            data = new ArrayBuffer(datasize);
-            view = new Int16Array(data, 2);
-            for(var i = 0; i < 4; i++) {
-                view[i] = i;
-            }
-            wsocket.send(view);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            var resultView = new Int16Array(evt.data);
-            for(var i = 0; i < resultView.length; i++) {
-                assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
-            }
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Send-binary-arraybufferview-int8.any.js
@@ -0,0 +1,38 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int8Array - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int8Array - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int8Array - Connection should be closed");
+
+        var data = "";
+        var datasize = 8;
+        var int8View;
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.binaryType = "arraybuffer";
+            data = new ArrayBuffer(datasize);
+            int8View = new Int8Array(data);
+            for (var i = 0; i < 8; i++) {
+                int8View[i] = i;
+            }
+            wsocket.send(int8View);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            var resultView = new Int8Array(evt.data);
+            for (var i = 0; i < resultView.length; i++) {
+                assert_equals(resultView[i], int8View[i], "ArrayBufferView returned is the same");
+            }
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Send-binary-arraybufferview-int8.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send binary data - ArrayBufferView - Int8Array - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int8Array - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int8Array - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int8Array - Connection should be closed");
-
-        var data = "";
-        var datasize = 8;
-        var int8View;
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.binaryType = "arraybuffer";
-            data = new ArrayBuffer(datasize);
-            int8View = new Int8Array(data);
-            for (var i = 0; i < 8; i++) {
-                int8View[i] = i;
-            }
-            wsocket.send(int8View);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            var resultView = new Int8Array(evt.data);
-            for (var i = 0; i < resultView.length; i++) {
-                assert_equals(resultView[i], int8View[i], "ArrayBufferView returned is the same");
-            }
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Send-binary-blob.any.js
@@ -0,0 +1,34 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - Blob - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - Blob - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - Blob - Connection should be closed");
+
+        var data = "";
+        var datasize = 65000;
+        var isOpenCalled = false;
+
+        var wsocket = CreateWebSocket(false, false, false);
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.binaryType = "blob";
+            for (var i = 0; i < datasize; i++)
+                data += String.fromCharCode(0);
+            data = new Blob([data]);
+            isOpenCalled = true;
+            wsocket.send(data);
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            assert_true(evt.data instanceof Blob);
+            assert_equals(evt.data.size, datasize);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_true(evt.wasClean, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Send-binary-blob.htm
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send binary data - Blob - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - Blob - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - Blob - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - Blob - Connection should be closed");
-
-        var data = "";
-        var datasize = 65000;
-        var isOpenCalled = false;
-
-        var wsocket = CreateWebSocket(false, false, false);
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.binaryType = "blob";
-            for (var i = 0; i < datasize; i++)
-                data += String.fromCharCode(0);
-            data = new Blob([data]);
-            isOpenCalled = true;
-            wsocket.send(data);
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            assert_true(evt.data instanceof Blob);
-            assert_equals(evt.data.size, datasize);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_true(evt.wasClean, "wasClean should be true");
-            testClose.done();
-        }), true);
-
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Send-data.any.js
@@ -0,0 +1,28 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send data on a WebSocket - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send data on a WebSocket - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send data on a WebSocket - Connection should be closed");
+
+        var data = "Message to send";
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.send(data);
+            assert_equals(data.length, wsocket.bufferedAmount);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            assert_equals(evt.data, data);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Send-data.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send data - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send data on a WebSocket - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send data on a WebSocket - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send data on a WebSocket - Connection should be closed");
-
-        var data = "Message to send";
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.send(data);
-            assert_equals(data.length, wsocket.bufferedAmount);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            assert_equals(evt.data, data);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Send-null.any.js
@@ -0,0 +1,30 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send null data on a WebSocket - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send null data on a WebSocket - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send null data on a WebSocket - Connection should be closed");
+
+        var data = null;
+        var nullReturned = false;
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.send(data);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            if ("null" == evt.data || "" == evt.data)
+                nullReturned = true;
+            assert_true(nullReturned);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Send-null.htm
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send null data - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send null data on a WebSocket - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send null data on a WebSocket - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send null data on a WebSocket - Connection should be closed");
-
-        var data = null;
-        var nullReturned = false;
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.send(data);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            if ("null" == evt.data || "" == evt.data)
-                nullReturned = true;
-            assert_true(nullReturned);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Send-paired-surrogates.any.js
@@ -0,0 +1,28 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send (paired surrogates) data on a WebSocket - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send (paired surrogates) data on a WebSocket - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send (paired surrogates) data on a WebSocket - Connection should be closed");
+
+        var data = "\uD801\uDC07";
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.send(data);
+            assert_equals(data.length * 2, wsocket.bufferedAmount);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            assert_equals(evt.data, data);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Send-paired-surrogates.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send (paired surrogates) data - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send (paired surrogates) data on a WebSocket - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send (paired surrogates) data on a WebSocket - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send (paired surrogates) data on a WebSocket - Connection should be closed");
-
-        var data = "\uD801\uDC07";
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.send(data);
-            assert_equals(data.length * 2, wsocket.bufferedAmount);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            assert_equals(evt.data, data);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/Send-unicode-data.any.js
@@ -0,0 +1,28 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Send unicode data on a WebSocket - Connection should be opened");
+        var testMessage = async_test("W3C WebSocket API - Send unicode data on a WebSocket - Message should be received");
+        var testClose = async_test("W3C WebSocket API - Send unicode data on a WebSocket - Connection should be closed");
+
+        var data = "¥¥¥¥¥¥";
+        var wsocket = CreateWebSocket(false, false, false);
+        var isOpenCalled = false;
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            wsocket.send(data);
+            assert_equals(data.length * 2, wsocket.bufferedAmount);
+            isOpenCalled = true;
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
+            assert_equals(evt.data, data);
+            wsocket.close();
+            testMessage.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(isOpenCalled, "WebSocket connection should be open");
+            assert_equals(evt.wasClean, true, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/Send-unicode-data.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Send unicode data - WebSocket</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Send unicode data on a WebSocket - Connection should be opened");
-        var testMessage = async_test("W3C WebSocket API - Send unicode data on a WebSocket - Message should be received");
-        var testClose = async_test("W3C WebSocket API - Send unicode data on a WebSocket - Connection should be closed");
-
-        var data = "¥¥¥¥¥¥";
-        var wsocket = CreateWebSocket(false, false, false);
-        var isOpenCalled = false;
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            wsocket.send(data);
-            assert_equals(data.length * 2, wsocket.bufferedAmount);
-            isOpenCalled = true;
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('message', testMessage.step_func(function (evt) {
-            assert_equals(evt.data, data);
-            wsocket.close();
-            testMessage.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(isOpenCalled, "WebSocket connection should be open");
-            assert_equals(evt.wasClean, true, "wasClean should be true");
-            testClose.done();
-        }), true);
-    </script>
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/binaryType-wrong-value.any.js
@@ -0,0 +1,19 @@
+// META: script=websocket.sub.js
+
+        var testOpen = async_test("W3C WebSocket API - Create WebSocket - set binaryType to something other than blob or arraybuffer - SYNTAX_ERR is returned - Connection should be opened");
+        var testClose = async_test("W3C WebSocket API - Create WebSocket - set binaryType to something other than blob or arraybuffer - SYNTAX_ERR is returned - Connection should be closed");
+
+        var wsocket = CreateWebSocket(true, false, false);
+
+        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
+            assert_equals(wsocket.binaryType, "blob");
+            wsocket.binaryType = "notBlobOrArrayBuffer";
+            assert_equals(wsocket.binaryType, "blob");
+            wsocket.close();
+            testOpen.done();
+        }), true);
+
+        wsocket.addEventListener('close', testClose.step_func(function (evt) {
+            assert_true(evt.wasClean, "wasClean should be true");
+            testClose.done();
+        }), true);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/binaryType-wrong-value.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>W3C WebSocket API - Create Secure WebSocket - binaryType is set to something other than blob/arraybuffer</title>
-    <script type="text/javascript" src="/resources/testharness.js"></script>
-    <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-    <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
-    <div id="log"></div>
-    <script type="text/javascript">
-
-        var testOpen = async_test("W3C WebSocket API - Create WebSocket - set binaryType to something other than blob or arraybuffer - SYNTAX_ERR is returned - Connection should be opened");
-        var testClose = async_test("W3C WebSocket API - Create WebSocket - set binaryType to something other than blob or arraybuffer - SYNTAX_ERR is returned - Connection should be closed");
-
-        var wsocket = CreateWebSocket(true, false, false);
-
-        wsocket.addEventListener('open', testOpen.step_func(function (evt) {
-            assert_equals(wsocket.binaryType, "blob");
-            wsocket.binaryType = "notBlobOrArrayBuffer";
-            assert_equals(wsocket.binaryType, "blob");
-            wsocket.close();
-            testOpen.done();
-        }), true);
-
-        wsocket.addEventListener('close', testClose.step_func(function (evt) {
-            assert_true(evt.wasClean, "wasClean should be true");
-            testClose.done();
-        }), true);
-
-    </script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/constructor.any.js
@@ -0,0 +1,7 @@
+// META: script=websocket.sub.js
+
+test(function() {
+  var ws = new WebSocket("ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH,
+                         "echo", "Stray argument")
+  assert_true(ws instanceof WebSocket, "Expected a WebSocket instance.")
+}, "Calling the WebSocket constructor with too many arguments should not throw.")
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/constructor.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<title>WebSocket constructor</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="websocket.sub.js"></script>
-<div id="log"></div>
-<script>
-test(function() {
-  var ws = new WebSocket("ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH,
-                         "echo", "Stray argument")
-  assert_true(ws instanceof WebSocket, "Expected a WebSocket instance.")
-}, "Calling the WebSocket constructor with too many arguments should not throw.")
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/websockets/eventhandlers.any.js
@@ -0,0 +1,13 @@
+// META: script=websocket.sub.js
+
+function testEventHandler(name) {
+  test(function() {
+    var ws = new WebSocket("ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH,
+                           "echo")
+    assert_equals(ws["on" + name], null);
+    ws["on" + name] = function() {};
+    ws["on" + name] = 2;
+    assert_equals(ws["on" + name], null);
+  }, "Event handler for " + name + " should have [TreatNonCallableAsNull]")
+}
+["open", "error", "close", "message"].forEach(testEventHandler);
deleted file mode 100644
--- a/testing/web-platform/tests/websockets/eventhandlers.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<title>WebSocket event handlers</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="websocket.sub.js"></script>
-<div id="log"></div>
-<script>
-function testEventHandler(name) {
-  test(function() {
-    var ws = new WebSocket("ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH,
-                           "echo")
-    assert_equals(ws["on" + name], null);
-    ws["on" + name] = function() {};
-    ws["on" + name] = 2;
-    assert_equals(ws["on" + name], null);
-  }, "Event handler for " + name + " should have [TreatNonCallableAsNull]")
-}
-["open", "error", "close", "message"].forEach(testEventHandler);
-</script>