Bug 1574531 [wpt PR 18502] - bluetooth: Gen tests to standalone window tests, a=testonly
authorOvidio Henriquez <odejesush@chromium.org>
Mon, 26 Aug 2019 11:26:25 +0000
changeset 490019 44ed57bf9874c18e138ebb8c6446916f6d0b82aa
parent 490018 042e9bf922c1899cf91e203e9ea189e6658db478
child 490020 0c9e01c0a88dec1280303fcd88a4fca883ceb9e0
push id113977
push userwptsync@mozilla.com
push dateTue, 27 Aug 2019 04:18:39 +0000
treeherdermozilla-inbound@a30fe5e28de7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1574531, 18502, 994756, 1757881, 688791
milestone70.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 1574531 [wpt PR 18502] - bluetooth: Gen tests to standalone window tests, a=testonly Automatic update from web-platform-tests bluetooth: Gen tests to standalone window tests This change updates the Bluetooth test generator to generate the tests as standalone window tests. This update allows the tests to be formatted with clang-format. The new generated tests now have the extension .https.window.js and have been processed with `git cl format --js` Bug: 994756 Change-Id: Ide5f1308905e3a35eccc7800391ea6e15f06741f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1757881 Commit-Queue: Ovidio de Jesús Ruiz-Henríquez <odejesush@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#688791} -- wpt-commits: 8405bbd389242937ffc8e0c4b9c2100546d8be40 wpt-pr: 18502
testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-characteristic-is-removed.https.html
testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-characteristic-is-removed.https.window.js
testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-descriptor-get-same-object.https.html
testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-descriptor-get-same-object.https.window.js
testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-service-is-removed.https.html
testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-service-is-removed.https.window.js
testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed-with-uuid.https.html
testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed.https.html
testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed.https.window.js
testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-descriptor-get-same-object.https.html
testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-descriptor-get-same-object.https.window.js
testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed-with-uuid.https.html
testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed.https.html
testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed.https.window.js
testing/web-platform/tests/bluetooth/characteristic/readValue/gen-characteristic-is-removed.https.html
testing/web-platform/tests/bluetooth/characteristic/readValue/gen-characteristic-is-removed.https.window.js
testing/web-platform/tests/bluetooth/characteristic/startNotifications/gen-characteristic-is-removed.https.html
testing/web-platform/tests/bluetooth/characteristic/startNotifications/gen-characteristic-is-removed.https.window.js
testing/web-platform/tests/bluetooth/characteristic/writeValue/gen-characteristic-is-removed.https.html
testing/web-platform/tests/bluetooth/characteristic/writeValue/gen-characteristic-is-removed.https.window.js
testing/web-platform/tests/bluetooth/descriptor/readValue/gen-service-is-removed.https.html
testing/web-platform/tests/bluetooth/descriptor/readValue/gen-service-is-removed.https.window.js
testing/web-platform/tests/bluetooth/descriptor/writeValue/gen-service-is-removed.https.html
testing/web-platform/tests/bluetooth/descriptor/writeValue/gen-service-is-removed.https.window.js
testing/web-platform/tests/bluetooth/generate.py
testing/web-platform/tests/bluetooth/generate_test.py
testing/web-platform/tests/bluetooth/script-tests/base_test_html.template
testing/web-platform/tests/bluetooth/script-tests/base_test_js.template
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-called-before.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-called-before.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-called-during-error.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-called-during-error.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-called-during-success.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-called-during-success.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-invalidates-objects.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-invalidates-objects.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnected-device.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnected-device.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-discovery-complete-no-permission-absent-service.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-discovery-complete-no-permission-absent-service.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-discovery-complete-service-not-found.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-discovery-complete-service-not-found.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-garbage-collection-ran-during-error.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-garbage-collection-ran-during-error.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-garbage-collection-ran-during-success.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-garbage-collection-ran-during-success.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-get-different-service-after-reconnection.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-get-different-service-after-reconnection.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-get-same-object.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-get-same-object.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-invalid-service-name.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-invalid-service-name.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-absent-service.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-absent-service.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-for-any-service.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-for-any-service.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-present-service.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-present-service.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-service-not-found.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-service-not-found.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-before-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-before-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-before.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-before.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-during-error-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-during-error-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-during-error.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-during-error.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-during-success-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-during-success-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-during-success.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-during-success.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-invalidates-objects-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-invalidates-objects-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-invalidates-objects.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-invalidates-objects.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnected-device-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnected-device-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnected-device.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnected-device.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-discovery-complete-no-permission-absent-service-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-discovery-complete-no-permission-absent-service-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-discovery-complete-service-not-found-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-discovery-complete-service-not-found-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-garbage-collection-ran-during-error-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-garbage-collection-ran-during-error-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-garbage-collection-ran-during-error.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-garbage-collection-ran-during-error.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-garbage-collection-ran-during-success-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-garbage-collection-ran-during-success-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-garbage-collection-ran-during-success.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-garbage-collection-ran-during-success.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-get-different-service-after-reconnection-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-get-different-service-after-reconnection-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-get-different-service-after-reconnection.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-get-different-service-after-reconnection.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-get-same-object-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-get-same-object-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-get-same-object.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-get-same-object.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-invalid-service-name.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-invalid-service-name.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-absent-service-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-absent-service-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-present-service-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-present-service-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-service-not-found-with-uuid.https.html
testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-service-not-found-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-blocklisted-characteristic.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-blocklisted-characteristic.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-characteristic-not-found.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-characteristic-not-found.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-garbage-collection-ran-during-error.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-garbage-collection-ran-during-error.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-get-same-object.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-get-same-object.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-invalid-characteristic-name.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-invalid-characteristic-name.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-reconnect-during.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-reconnect-during.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-service-is-removed.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-service-is-removed.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-blocklisted-characteristic-with-uuid.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-blocklisted-characteristic-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-characteristic-not-found-with-uuid.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-characteristic-not-found-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-garbage-collection-ran-during-error-with-uuid.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-garbage-collection-ran-during-error-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-garbage-collection-ran-during-error.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-garbage-collection-ran-during-error.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-get-same-object-with-uuid.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-get-same-object-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-get-same-object.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-get-same-object.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-invalid-characteristic-name.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-invalid-characteristic-name.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-reconnect-during-with-uuid.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-reconnect-during-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-reconnect-during.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-reconnect-during.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-service-is-removed-with-uuid.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-service-is-removed-with-uuid.https.window.js
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-service-is-removed.https.html
testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-service-is-removed.https.window.js
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-characteristic-is-removed.https.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.';
-const expected = new DOMException('GATT Characteristic no longer exists.',
-                                  'InvalidStateError');
-let fake_peripheral, characteristic, fake_characteristic;
-
-bluetooth_test(() => getMeasurementIntervalCharacteristic()
-    .then(_ => ({fake_peripheral, characteristic, fake_characteristic} = _))
-    .then(() => characteristic.getDescriptor(user_description.name))
-    .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e))
-    .then(() => fake_characteristic.remove())
-    .then(() => fake_peripheral.simulateGATTServicesChanged())
-    .then(() => assert_promise_rejects_with_message(
-      characteristic.getDescriptor(user_description.name), expected)),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-characteristic-is-removed.https.window.js
@@ -0,0 +1,29 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.';
+const expected = new DOMException(
+    'GATT Characteristic no longer exists.', 'InvalidStateError');
+let fake_peripheral, characteristic, fake_characteristic;
+
+bluetooth_test(
+    () =>
+        getMeasurementIntervalCharacteristic()
+            .then(
+                _ => (
+                    {fake_peripheral, characteristic, fake_characteristic} = _))
+            .then(() => characteristic.getDescriptor(user_description.name))
+            .then(
+                () => null,
+                (e) => assert_unreached('Caught error unexpectedly.', e))
+            .then(() => fake_characteristic.remove())
+            .then(() => fake_peripheral.simulateGATTServicesChanged())
+            .then(
+                () => assert_promise_rejects_with_message(
+                    characteristic.getDescriptor(user_description.name),
+                    expected)),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-descriptor-get-same-object.https.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Calls to getDescriptor should return the same object.';
-let characteristic;
-
-bluetooth_test(() => getMeasurementIntervalCharacteristic()
-    .then(_ => ({characteristic} = _))
-    .then(() => Promise.all([
-      characteristic.getDescriptor(user_description.alias),
-      characteristic.getDescriptor(user_description.name),
-      characteristic.getDescriptor(user_description.uuid)
-    ]))
-    .then(descriptors_arrays => {
-      assert_true(descriptors_arrays.length > 0)
-
-      // Convert to arrays if necessary.
-      for (let i = 0; i < descriptors_arrays.length; i++) {
-        descriptors_arrays[i] = [].concat(descriptors_arrays[i]);
-      }
-
-      for (let i = 1; i < descriptors_arrays.length; i++) {
-        assert_equals(descriptors_arrays[0].length,
-            descriptors_arrays[i].length);
-      }
-
-      let base_set = new Set(descriptors_arrays[0]);
-      for (let descriptors of descriptors_arrays) {
-        descriptors.forEach(descriptor => assert_true(base_set.has(descriptor)));
-      }
-    }), test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-descriptor-get-same-object.https.window.js
@@ -0,0 +1,39 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Calls to getDescriptor should return the same object.';
+let characteristic;
+
+bluetooth_test(
+    () => getMeasurementIntervalCharacteristic()
+              .then(_ => ({characteristic} = _))
+              .then(() => Promise.all([
+                characteristic.getDescriptor(user_description.alias),
+                characteristic.getDescriptor(user_description.name),
+                characteristic.getDescriptor(user_description.uuid)
+              ]))
+              .then(descriptors_arrays => {
+                assert_true(descriptors_arrays.length > 0)
+
+                // Convert to arrays if necessary.
+                for (let i = 0; i < descriptors_arrays.length; i++) {
+                  descriptors_arrays[i] = [].concat(descriptors_arrays[i]);
+                }
+
+                for (let i = 1; i < descriptors_arrays.length; i++) {
+                  assert_equals(
+                      descriptors_arrays[0].length,
+                      descriptors_arrays[i].length);
+                }
+
+                let base_set = new Set(descriptors_arrays[0]);
+                for (let descriptors of descriptors_arrays) {
+                  descriptors.forEach(
+                      descriptor => assert_true(base_set.has(descriptor)));
+                }
+              }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-service-is-removed.https.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-// TODO(https://crbug.com/672127) Use this test case to test the rest of
-// characteristic functions.
-'use strict';
-const test_desc = 'Service is removed. Reject with InvalidStateError.';
-const expected = new DOMException('GATT Service no longer exists.',
-    'InvalidStateError');
-let characteristic, fake_peripheral, fake_service;
-
-bluetooth_test(() => getMeasurementIntervalCharacteristic()
-    .then(_ => ({characteristic, fake_peripheral, fake_service} = _))
-    .then(() => fake_service.remove())
-    .then(() => fake_peripheral.simulateGATTServicesChanged())
-    .then(() => assert_promise_rejects_with_message(
-        characteristic.getDescriptor(user_description.name),
-        expected,
-        'Service got removed.')),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/characteristic/getDescriptor/gen-service-is-removed.https.window.js
@@ -0,0 +1,24 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+// TODO(https://crbug.com/672127) Use this test case to test the rest of
+// characteristic functions.
+'use strict';
+const test_desc = 'Service is removed. Reject with InvalidStateError.';
+const expected =
+    new DOMException('GATT Service no longer exists.', 'InvalidStateError');
+let characteristic, fake_peripheral, fake_service;
+
+bluetooth_test(
+    () => getMeasurementIntervalCharacteristic()
+              .then(_ => ({characteristic, fake_peripheral, fake_service} = _))
+              .then(() => fake_service.remove())
+              .then(() => fake_peripheral.simulateGATTServicesChanged())
+              .then(
+                  () => assert_promise_rejects_with_message(
+                      characteristic.getDescriptor(user_description.name),
+                      expected, 'Service got removed.')),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed-with-uuid.https.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.';
-const expected = new DOMException('GATT Characteristic no longer exists.',
-                                  'InvalidStateError');
-let fake_peripheral, characteristic, fake_characteristic;
-
-bluetooth_test(() => getMeasurementIntervalCharacteristic()
-    .then(_ => ({fake_peripheral, characteristic, fake_characteristic} = _))
-    .then(() => characteristic.getDescriptor(user_description.name))
-    .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e))
-    .then(() => fake_characteristic.remove())
-    .then(() => fake_peripheral.simulateGATTServicesChanged())
-    .then(() => assert_promise_rejects_with_message(
-      characteristic.getDescriptors(user_description.name), expected)),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed-with-uuid.https.window.js
@@ -0,0 +1,29 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.';
+const expected = new DOMException(
+    'GATT Characteristic no longer exists.', 'InvalidStateError');
+let fake_peripheral, characteristic, fake_characteristic;
+
+bluetooth_test(
+    () =>
+        getMeasurementIntervalCharacteristic()
+            .then(
+                _ => (
+                    {fake_peripheral, characteristic, fake_characteristic} = _))
+            .then(() => characteristic.getDescriptor(user_description.name))
+            .then(
+                () => null,
+                (e) => assert_unreached('Caught error unexpectedly.', e))
+            .then(() => fake_characteristic.remove())
+            .then(() => fake_peripheral.simulateGATTServicesChanged())
+            .then(
+                () => assert_promise_rejects_with_message(
+                    characteristic.getDescriptors(user_description.name),
+                    expected)),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed.https.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.';
-const expected = new DOMException('GATT Characteristic no longer exists.',
-                                  'InvalidStateError');
-let fake_peripheral, characteristic, fake_characteristic;
-
-bluetooth_test(() => getMeasurementIntervalCharacteristic()
-    .then(_ => ({fake_peripheral, characteristic, fake_characteristic} = _))
-    .then(() => characteristic.getDescriptor(user_description.name))
-    .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e))
-    .then(() => fake_characteristic.remove())
-    .then(() => fake_peripheral.simulateGATTServicesChanged())
-    .then(() => assert_promise_rejects_with_message(
-      characteristic.getDescriptors(), expected)),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-characteristic-is-removed.https.window.js
@@ -0,0 +1,28 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.';
+const expected = new DOMException(
+    'GATT Characteristic no longer exists.', 'InvalidStateError');
+let fake_peripheral, characteristic, fake_characteristic;
+
+bluetooth_test(
+    () =>
+        getMeasurementIntervalCharacteristic()
+            .then(
+                _ => (
+                    {fake_peripheral, characteristic, fake_characteristic} = _))
+            .then(() => characteristic.getDescriptor(user_description.name))
+            .then(
+                () => null,
+                (e) => assert_unreached('Caught error unexpectedly.', e))
+            .then(() => fake_characteristic.remove())
+            .then(() => fake_peripheral.simulateGATTServicesChanged())
+            .then(
+                () => assert_promise_rejects_with_message(
+                    characteristic.getDescriptors(), expected)),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-descriptor-get-same-object.https.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Calls to getDescriptors should return the same object.';
-let characteristic;
-
-bluetooth_test(() => getMeasurementIntervalCharacteristic()
-    .then(_ => ({characteristic} = _))
-    .then(() => Promise.all([
-      characteristic.getDescriptors(user_description.alias),
-      characteristic.getDescriptors(user_description.name),
-      characteristic.getDescriptors(user_description.uuid)
-    ]))
-    .then(descriptors_arrays => {
-      assert_true(descriptors_arrays.length > 0)
-
-      // Convert to arrays if necessary.
-      for (let i = 0; i < descriptors_arrays.length; i++) {
-        descriptors_arrays[i] = [].concat(descriptors_arrays[i]);
-      }
-
-      for (let i = 1; i < descriptors_arrays.length; i++) {
-        assert_equals(descriptors_arrays[0].length,
-            descriptors_arrays[i].length);
-      }
-
-      let base_set = new Set(descriptors_arrays[0]);
-      for (let descriptors of descriptors_arrays) {
-        descriptors.forEach(descriptor => assert_true(base_set.has(descriptor)));
-      }
-    }), test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-descriptor-get-same-object.https.window.js
@@ -0,0 +1,39 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Calls to getDescriptors should return the same object.';
+let characteristic;
+
+bluetooth_test(
+    () => getMeasurementIntervalCharacteristic()
+              .then(_ => ({characteristic} = _))
+              .then(() => Promise.all([
+                characteristic.getDescriptors(user_description.alias),
+                characteristic.getDescriptors(user_description.name),
+                characteristic.getDescriptors(user_description.uuid)
+              ]))
+              .then(descriptors_arrays => {
+                assert_true(descriptors_arrays.length > 0)
+
+                // Convert to arrays if necessary.
+                for (let i = 0; i < descriptors_arrays.length; i++) {
+                  descriptors_arrays[i] = [].concat(descriptors_arrays[i]);
+                }
+
+                for (let i = 1; i < descriptors_arrays.length; i++) {
+                  assert_equals(
+                      descriptors_arrays[0].length,
+                      descriptors_arrays[i].length);
+                }
+
+                let base_set = new Set(descriptors_arrays[0]);
+                for (let descriptors of descriptors_arrays) {
+                  descriptors.forEach(
+                      descriptor => assert_true(base_set.has(descriptor)));
+                }
+              }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed-with-uuid.https.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-// TODO(https://crbug.com/672127) Use this test case to test the rest of
-// characteristic functions.
-'use strict';
-const test_desc = 'Service is removed. Reject with InvalidStateError.';
-const expected = new DOMException('GATT Service no longer exists.',
-    'InvalidStateError');
-let characteristic, fake_peripheral, fake_service;
-
-bluetooth_test(() => getMeasurementIntervalCharacteristic()
-    .then(_ => ({characteristic, fake_peripheral, fake_service} = _))
-    .then(() => fake_service.remove())
-    .then(() => fake_peripheral.simulateGATTServicesChanged())
-    .then(() => assert_promise_rejects_with_message(
-        characteristic.getDescriptors(user_description.uuid),
-        expected,
-        'Service got removed.')),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed-with-uuid.https.window.js
@@ -0,0 +1,24 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+// TODO(https://crbug.com/672127) Use this test case to test the rest of
+// characteristic functions.
+'use strict';
+const test_desc = 'Service is removed. Reject with InvalidStateError.';
+const expected =
+    new DOMException('GATT Service no longer exists.', 'InvalidStateError');
+let characteristic, fake_peripheral, fake_service;
+
+bluetooth_test(
+    () => getMeasurementIntervalCharacteristic()
+              .then(_ => ({characteristic, fake_peripheral, fake_service} = _))
+              .then(() => fake_service.remove())
+              .then(() => fake_peripheral.simulateGATTServicesChanged())
+              .then(
+                  () => assert_promise_rejects_with_message(
+                      characteristic.getDescriptors(user_description.uuid),
+                      expected, 'Service got removed.')),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed.https.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-// TODO(https://crbug.com/672127) Use this test case to test the rest of
-// characteristic functions.
-'use strict';
-const test_desc = 'Service is removed. Reject with InvalidStateError.';
-const expected = new DOMException('GATT Service no longer exists.',
-    'InvalidStateError');
-let characteristic, fake_peripheral, fake_service;
-
-bluetooth_test(() => getMeasurementIntervalCharacteristic()
-    .then(_ => ({characteristic, fake_peripheral, fake_service} = _))
-    .then(() => fake_service.remove())
-    .then(() => fake_peripheral.simulateGATTServicesChanged())
-    .then(() => assert_promise_rejects_with_message(
-        characteristic.getDescriptors(user_description.name),
-        expected,
-        'Service got removed.')),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/characteristic/getDescriptors/gen-service-is-removed.https.window.js
@@ -0,0 +1,24 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+// TODO(https://crbug.com/672127) Use this test case to test the rest of
+// characteristic functions.
+'use strict';
+const test_desc = 'Service is removed. Reject with InvalidStateError.';
+const expected =
+    new DOMException('GATT Service no longer exists.', 'InvalidStateError');
+let characteristic, fake_peripheral, fake_service;
+
+bluetooth_test(
+    () => getMeasurementIntervalCharacteristic()
+              .then(_ => ({characteristic, fake_peripheral, fake_service} = _))
+              .then(() => fake_service.remove())
+              .then(() => fake_peripheral.simulateGATTServicesChanged())
+              .then(
+                  () => assert_promise_rejects_with_message(
+                      characteristic.getDescriptors(user_description.name),
+                      expected, 'Service got removed.')),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/characteristic/readValue/gen-characteristic-is-removed.https.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.';
-const expected = new DOMException('GATT Characteristic no longer exists.',
-                                  'InvalidStateError');
-let fake_peripheral, characteristic, fake_characteristic;
-
-bluetooth_test(() => getMeasurementIntervalCharacteristic()
-    .then(_ => ({fake_peripheral, characteristic, fake_characteristic} = _))
-    .then(() => characteristic.getDescriptor(user_description.name))
-    .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e))
-    .then(() => fake_characteristic.remove())
-    .then(() => fake_peripheral.simulateGATTServicesChanged())
-    .then(() => assert_promise_rejects_with_message(
-      characteristic.readValue(), expected)),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/characteristic/readValue/gen-characteristic-is-removed.https.window.js
@@ -0,0 +1,28 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.';
+const expected = new DOMException(
+    'GATT Characteristic no longer exists.', 'InvalidStateError');
+let fake_peripheral, characteristic, fake_characteristic;
+
+bluetooth_test(
+    () =>
+        getMeasurementIntervalCharacteristic()
+            .then(
+                _ => (
+                    {fake_peripheral, characteristic, fake_characteristic} = _))
+            .then(() => characteristic.getDescriptor(user_description.name))
+            .then(
+                () => null,
+                (e) => assert_unreached('Caught error unexpectedly.', e))
+            .then(() => fake_characteristic.remove())
+            .then(() => fake_peripheral.simulateGATTServicesChanged())
+            .then(
+                () => assert_promise_rejects_with_message(
+                    characteristic.readValue(), expected)),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/characteristic/startNotifications/gen-characteristic-is-removed.https.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.';
-const expected = new DOMException('GATT Characteristic no longer exists.',
-                                  'InvalidStateError');
-let fake_peripheral, characteristic, fake_characteristic;
-
-bluetooth_test(() => getMeasurementIntervalCharacteristic()
-    .then(_ => ({fake_peripheral, characteristic, fake_characteristic} = _))
-    .then(() => characteristic.getDescriptor(user_description.name))
-    .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e))
-    .then(() => fake_characteristic.remove())
-    .then(() => fake_peripheral.simulateGATTServicesChanged())
-    .then(() => assert_promise_rejects_with_message(
-      characteristic.startNotifications(), expected)),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/characteristic/startNotifications/gen-characteristic-is-removed.https.window.js
@@ -0,0 +1,28 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.';
+const expected = new DOMException(
+    'GATT Characteristic no longer exists.', 'InvalidStateError');
+let fake_peripheral, characteristic, fake_characteristic;
+
+bluetooth_test(
+    () =>
+        getMeasurementIntervalCharacteristic()
+            .then(
+                _ => (
+                    {fake_peripheral, characteristic, fake_characteristic} = _))
+            .then(() => characteristic.getDescriptor(user_description.name))
+            .then(
+                () => null,
+                (e) => assert_unreached('Caught error unexpectedly.', e))
+            .then(() => fake_characteristic.remove())
+            .then(() => fake_peripheral.simulateGATTServicesChanged())
+            .then(
+                () => assert_promise_rejects_with_message(
+                    characteristic.startNotifications(), expected)),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/characteristic/writeValue/gen-characteristic-is-removed.https.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.';
-const expected = new DOMException('GATT Characteristic no longer exists.',
-                                  'InvalidStateError');
-let fake_peripheral, characteristic, fake_characteristic;
-
-bluetooth_test(() => getMeasurementIntervalCharacteristic()
-    .then(_ => ({fake_peripheral, characteristic, fake_characteristic} = _))
-    .then(() => characteristic.getDescriptor(user_description.name))
-    .then(() => null, (e) => assert_unreached('Caught error unexpectedly.', e))
-    .then(() => fake_characteristic.remove())
-    .then(() => fake_peripheral.simulateGATTServicesChanged())
-    .then(() => assert_promise_rejects_with_message(
-      characteristic.writeValue(new Uint8Array(1)), expected)),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/characteristic/writeValue/gen-characteristic-is-removed.https.window.js
@@ -0,0 +1,28 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.';
+const expected = new DOMException(
+    'GATT Characteristic no longer exists.', 'InvalidStateError');
+let fake_peripheral, characteristic, fake_characteristic;
+
+bluetooth_test(
+    () =>
+        getMeasurementIntervalCharacteristic()
+            .then(
+                _ => (
+                    {fake_peripheral, characteristic, fake_characteristic} = _))
+            .then(() => characteristic.getDescriptor(user_description.name))
+            .then(
+                () => null,
+                (e) => assert_unreached('Caught error unexpectedly.', e))
+            .then(() => fake_characteristic.remove())
+            .then(() => fake_peripheral.simulateGATTServicesChanged())
+            .then(
+                () => assert_promise_rejects_with_message(
+                    characteristic.writeValue(new Uint8Array(1)), expected)),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/descriptor/readValue/gen-service-is-removed.https.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Service gets removed. Reject with InvalidStateError.';
-const expected = new DOMException('GATT Service no longer exists.',
-    'InvalidStateError');
-let descriptor, fake_peripheral, fake_service;
-
-bluetooth_test(() => getUserDescriptionDescriptor()
-    .then(_ => ({descriptor, fake_peripheral, fake_service} = _))
-    .then(() => fake_service.remove())
-    .then(() => fake_peripheral.simulateGATTServicesChanged())
-    .then(() => assert_promise_rejects_with_message(
-        descriptor.readValue(),
-        expected,
-        'Service got removed.')),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/descriptor/readValue/gen-service-is-removed.https.window.js
@@ -0,0 +1,22 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Service gets removed. Reject with InvalidStateError.';
+const expected =
+    new DOMException('GATT Service no longer exists.', 'InvalidStateError');
+let descriptor, fake_peripheral, fake_service;
+
+bluetooth_test(
+    () =>
+        getUserDescriptionDescriptor()
+            .then(_ => ({descriptor, fake_peripheral, fake_service} = _))
+            .then(() => fake_service.remove())
+            .then(() => fake_peripheral.simulateGATTServicesChanged())
+            .then(
+                () => assert_promise_rejects_with_message(
+                    descriptor.readValue(), expected, 'Service got removed.')),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/descriptor/writeValue/gen-service-is-removed.https.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Service gets removed. Reject with InvalidStateError.';
-const expected = new DOMException('GATT Service no longer exists.',
-    'InvalidStateError');
-let descriptor, fake_peripheral, fake_service;
-
-bluetooth_test(() => getUserDescriptionDescriptor()
-    .then(_ => ({descriptor, fake_peripheral, fake_service} = _))
-    .then(() => fake_service.remove())
-    .then(() => fake_peripheral.simulateGATTServicesChanged())
-    .then(() => assert_promise_rejects_with_message(
-        descriptor.writeValue(new ArrayBuffer(1 /* length */)),
-        expected,
-        'Service got removed.')),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/descriptor/writeValue/gen-service-is-removed.https.window.js
@@ -0,0 +1,22 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Service gets removed. Reject with InvalidStateError.';
+const expected =
+    new DOMException('GATT Service no longer exists.', 'InvalidStateError');
+let descriptor, fake_peripheral, fake_service;
+
+bluetooth_test(
+    () => getUserDescriptionDescriptor()
+              .then(_ => ({descriptor, fake_peripheral, fake_service} = _))
+              .then(() => fake_service.remove())
+              .then(() => fake_peripheral.simulateGATTServicesChanged())
+              .then(
+                  () => assert_promise_rejects_with_message(
+                      descriptor.writeValue(new ArrayBuffer(1 /* length */)),
+                      expected, 'Service got removed.')),
+    test_desc);
--- a/testing/web-platform/tests/bluetooth/generate.py
+++ b/testing/web-platform/tests/bluetooth/generate.py
@@ -3,19 +3,19 @@
 # found in the LICENSE file.
 #
 # TODO(509038): Delete the file in LayoutTests/bluetooth after all the script
 # tests have been migrated to this directory.
 """Generator script for Web Bluetooth LayoutTests.
 
 For each script-tests/X.js creates the following test files depending on the
 contents of X.js
-- getPrimaryService/X.html
-- getPrimaryServices/X.html
-- getPrimaryServices/X-with-uuid.html
+- getPrimaryService/X.https.window.js
+- getPrimaryServices/X.https.window.js
+- getPrimaryServices/X-with-uuid.https.window.js
 
 script-tests/X.js files should contain "CALLS([variation1 | variation2 | ...])"
 tokens that indicate what files to generate. Each variation in CALLS([...])
 should corresponds to a js function call and its arguments. Additionally a
 variation can end in [UUID] to indicate that the generated file's name should
 have the -with-uuid suffix.
 
 The PREVIOUS_CALL token will be replaced with the function that replaced CALLS.
@@ -31,24 +31,24 @@ promise_test(() => {
         .then(device => device.gatt.CALLS([
             getPrimaryService('heart_rate')|
             getPrimaryServices('heart_rate')[UUID]]))
         .then(device => device.gatt.PREVIOUS_CALL);
 }, 'example test for FUNCTION_NAME');
 
 this script will generate:
 
-// getPrimaryService/example.html
+// getPrimaryService/example.https.window.js
 promise_test(() => {
     return navigator.bluetooth.requestDevice(...)
         .then(device => device.gatt.getPrimaryService('heart_rate'))
         .then(device => device.gatt.getPrimaryService('heart_rate'));
 }, 'example test for getPrimaryService');
 
-// getPrimaryServices/example-with-uuid.html
+// getPrimaryServices/example-with-uuid.https.window.js
 promise_test(() => {
     return navigator.bluetooth.requestDevice(...)
         .then(device => device.gatt.getPrimaryServices('heart_rate'))
         .then(device => device.gatt.getPrimaryServices('heart_rate'));
 }, 'example test for getPrimaryServices');
 
 Run
 $ python //third_party/WebKit/LayoutTests/bluetooth/generate.py
@@ -76,17 +76,17 @@ def GetGeneratedTests():
     """Yields a GeneratedTest for each call in templates in script-tests."""
     bluetooth_tests_dir = os.path.dirname(os.path.realpath(__file__))
 
     # Read Base Test Template.
     base_template_file_handle = open(
         os.path.join(
             bluetooth_tests_dir,
             TEMPLATES_DIR,
-            'base_test_html.template'
+            'base_test_js.template'
         ), 'r')
     base_template_file_data = base_template_file_handle.read().decode('utf-8')
     base_template_file_handle.close()
 
     # Get Templates.
 
     template_path = os.path.join(bluetooth_tests_dir, TEMPLATES_DIR)
 
@@ -135,27 +135,27 @@ def GetGeneratedTests():
             # Replace template tokens
             call_test_file_data = new_test_file_data
             call_test_file_data = call_test_file_data.replace('CALLS', '{}({})'.format(function_name, args))
             call_test_file_data = call_test_file_data.replace('FUNCTION_NAME', function_name)
 
             # Get test file name
             group_dir = os.path.basename(os.path.abspath(os.path.join(template, os.pardir)))
 
-            call_test_file_name = 'gen-{}{}.https.html'.format(template_name, '-with-uuid' if uuid_suffix else '')
+            call_test_file_name = 'gen-{}{}.https.window.js'.format(template_name, '-with-uuid' if uuid_suffix else '')
             call_test_file_path = os.path.join(bluetooth_tests_dir, group_dir, function_name, call_test_file_name)
 
             yield GeneratedTest(call_test_file_data, call_test_file_path, template)
 
 def main():
     logging.basicConfig(level=logging.INFO)
     previous_generated_files = set()
     current_path = os.path.dirname(os.path.realpath(__file__))
     for root, _, filenames in os.walk(current_path):
-        for filename in fnmatch.filter(filenames, 'gen-*.https.html'):
+        for filename in fnmatch.filter(filenames, 'gen-*.https.window.js'):
             previous_generated_files.add(os.path.join(root, filename))
 
     generated_files = set()
     for generated_test in GetGeneratedTests():
         prev_len = len(generated_files)
         generated_files.add(generated_test.path)
         if prev_len == len(generated_files):
             logging.info('Generated the same test twice for template:\n%s',
--- a/testing/web-platform/tests/bluetooth/generate_test.py
+++ b/testing/web-platform/tests/bluetooth/generate_test.py
@@ -37,17 +37,17 @@ def main():
                      generated_test.path,
                      generated_test.template)
         return -1
 
   # Tests that there are no obsolete generated files.
   previous_generated_files = set()
   current_path = os.path.dirname(os.path.realpath(__file__))
   for root, _, filenames in os.walk(current_path):
-    for filename in fnmatch.filter(filenames, 'gen-*.https.html'):
+    for filename in fnmatch.filter(filenames, 'gen-*.https.window.js'):
       previous_generated_files.add(os.path.join(root, filename))
 
   if previous_generated_files != generated_files:
     logging.error('There are extra generated tests. Please remove them.')
     for test_path in previous_generated_files - generated_files:
       logging.error('%s', test_path)
     return -1
 
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/script-tests/base_test_html.template
+++ /dev/null
@@ -1,10 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-TEST
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/script-tests/base_test_js.template
@@ -0,0 +1,7 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+TEST
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-called-before.https.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'disconnect() called before getPrimaryService. ' +
-    'Reject with NetworkError.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
-    'first with `device.gatt.connect`.',
-    'NetworkError');
-let device;
-
-bluetooth_test(() => getConnectedHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['generic_access']
-    })
-    .then(_ => ({device} = _))
-    .then(() => device.gatt.disconnect())
-    .then(() => assert_promise_rejects_with_message(
-        device.gatt.getPrimaryService('health_thermometer'),
-        expected)),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-called-before.https.window.js
@@ -0,0 +1,27 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'disconnect() called before getPrimaryService. ' +
+    'Reject with NetworkError.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
+        'first with `device.gatt.connect`.',
+    'NetworkError');
+let device;
+
+bluetooth_test(
+    () => getConnectedHealthThermometerDevice({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['generic_access']
+          })
+              .then(_ => ({device} = _))
+              .then(() => device.gatt.disconnect())
+              .then(
+                  () => assert_promise_rejects_with_message(
+                      device.gatt.getPrimaryService('health_thermometer'),
+                      expected)),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-called-during-error.https.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'disconnect() called during a getPrimaryService ' +
-    'call that fails. Reject with NetworkError.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
-    'first with `device.gatt.connect`.', 'NetworkError');
-let device;
-
-bluetooth_test(() => getEmptyHealthThermometerDevice()
-    .then(_ => ({device} = _))
-    .then(() => {
-      let promise = assert_promise_rejects_with_message(
-        device.gatt.getPrimaryService('health_thermometer'),
-        expected)
-      device.gatt.disconnect();
-      return promise;
-    }),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-called-during-error.https.window.js
@@ -0,0 +1,24 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'disconnect() called during a getPrimaryService ' +
+    'call that fails. Reject with NetworkError.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
+        'first with `device.gatt.connect`.',
+    'NetworkError');
+let device;
+
+bluetooth_test(
+    () =>
+        getEmptyHealthThermometerDevice().then(_ => ({device} = _)).then(() => {
+          let promise = assert_promise_rejects_with_message(
+              device.gatt.getPrimaryService('health_thermometer'), expected)
+          device.gatt.disconnect();
+          return promise;
+        }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-called-during-success.https.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'disconnect() called during a getPrimaryService call that ' +
-    'succeeds. Reject with NetworkError.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
-    'first with `device.gatt.connect`.',
-     'NetworkError');
-
-bluetooth_test(() => getHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['generic_access']
-    })
-    .then(({device}) => {
-      let promise = assert_promise_rejects_with_message(
-        device.gatt.getPrimaryService('health_thermometer'),
-        expected);
-      device.gatt.disconnect();
-      return promise;
-    }), test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-called-during-success.https.window.js
@@ -0,0 +1,25 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'disconnect() called during a getPrimaryService call that ' +
+    'succeeds. Reject with NetworkError.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
+        'first with `device.gatt.connect`.',
+    'NetworkError');
+
+bluetooth_test(
+    () => getHealthThermometerDevice({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['generic_access']
+          }).then(({device}) => {
+      let promise = assert_promise_rejects_with_message(
+          device.gatt.getPrimaryService('health_thermometer'), expected);
+      device.gatt.disconnect();
+      return promise;
+    }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-invalidates-objects.https.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Calls on services after we disconnect and connect again. '+
-   'Should reject with InvalidStateError.';
-let device, services;
-
-bluetooth_test(() => getHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}]
-    })
-    .then(_ => ({device} = _))
-    .then(() => device.gatt.getPrimaryService('health_thermometer'))
-    // Convert to array if necessary.
-    .then(s => services = [].concat(s))
-    .then(() => device.gatt.disconnect())
-    .then(() => device.gatt.connect())
-    .then(() => {
-      let promises = Promise.resolve();
-      for (let service of services) {
-        let error = new DOMException(
-          `Service with UUID ${service.uuid} is no longer valid. Remember ` +
-          `to retrieve the service again after reconnecting.`,
-          'InvalidStateError');
-        promises = promises.then(() =>
-            assert_promise_rejects_with_message(
-                service.getCharacteristic('measurement_interval'),
-                error));
-        promises = promises.then(() =>
-            assert_promise_rejects_with_message(
-                service.getCharacteristics(),
-                error));
-        promises = promises.then(() =>
-            assert_promise_rejects_with_message(
-                service.getCharacteristics('measurement_interval'),
-                error));
-      }
-      return promises;
-    }), test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnect-invalidates-objects.https.window.js
@@ -0,0 +1,43 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Calls on services after we disconnect and connect again. ' +
+    'Should reject with InvalidStateError.';
+let device, services;
+
+bluetooth_test(
+    () => getHealthThermometerDevice(
+              {filters: [{services: ['health_thermometer']}]})
+              .then(_ => ({device} = _))
+              .then(() => device.gatt.getPrimaryService('health_thermometer'))
+              // Convert to array if necessary.
+              .then(s => services = [].concat(s))
+              .then(() => device.gatt.disconnect())
+              .then(() => device.gatt.connect())
+              .then(() => {
+                let promises = Promise.resolve();
+                for (let service of services) {
+                  let error = new DOMException(
+                      `Service with UUID ${
+                          service.uuid} is no longer valid. Remember ` +
+                          `to retrieve the service again after reconnecting.`,
+                      'InvalidStateError');
+                  promises = promises.then(
+                      () => assert_promise_rejects_with_message(
+                          service.getCharacteristic('measurement_interval'),
+                          error));
+                  promises = promises.then(
+                      () => assert_promise_rejects_with_message(
+                          service.getCharacteristics(), error));
+                  promises = promises.then(
+                      () => assert_promise_rejects_with_message(
+                          service.getCharacteristics('measurement_interval'),
+                          error));
+                }
+                return promises;
+              }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnected-device.https.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'getPrimaryService called before connecting. Reject with ' +
-    'NetworkError.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
-    'first with `device.gatt.connect`.',
-    'NetworkError');
-
-bluetooth_test(() => getDiscoveredHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['generic_access']
-    })
-    .then(({device}) => assert_promise_rejects_with_message(
-        device.gatt.getPrimaryService('health_thermometer'),
-        expected)),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-disconnected-device.https.window.js
@@ -0,0 +1,24 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'getPrimaryService called before connecting. Reject with ' +
+    'NetworkError.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
+        'first with `device.gatt.connect`.',
+    'NetworkError');
+
+bluetooth_test(
+    () => getDiscoveredHealthThermometerDevice({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['generic_access']
+          })
+              .then(
+                  ({device}) => assert_promise_rejects_with_message(
+                      device.gatt.getPrimaryService('health_thermometer'),
+                      expected)),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-discovery-complete-no-permission-absent-service.https.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Request for absent service without permission. Should ' +
-    'Reject with SecurityError even if services have been discovered already.';
-const expected = new DOMException(
-    'Origin is not allowed to access the service. Tip: Add the service ' +
-    'UUID to \'optionalServices\' in requestDevice() options. ' +
-    'https://goo.gl/HxfxSQ',
-    'SecurityError');
-let device;
-
-bluetooth_test(() => getHealthThermometerDeviceWithServicesDiscovered({
-      filters: [{services: ['health_thermometer']}]
-    })
-    .then(_ => ({device} = _))
-    .then(() => Promise.all([
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryService(glucose.alias), expected),
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryService(glucose.name), expected),
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryService(glucose.uuid), expected)])),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-discovery-complete-no-permission-absent-service.https.window.js
@@ -0,0 +1,29 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Request for absent service without permission. Should ' +
+    'Reject with SecurityError even if services have been discovered already.';
+const expected = new DOMException(
+    'Origin is not allowed to access the service. Tip: Add the service ' +
+        'UUID to \'optionalServices\' in requestDevice() options. ' +
+        'https://goo.gl/HxfxSQ',
+    'SecurityError');
+let device;
+
+bluetooth_test(
+    () => getHealthThermometerDeviceWithServicesDiscovered(
+              {filters: [{services: ['health_thermometer']}]})
+              .then(_ => ({device} = _))
+              .then(() => Promise.all([
+                assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryService(glucose.alias), expected),
+                assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryService(glucose.name), expected),
+                assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryService(glucose.uuid), expected)
+              ])),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-discovery-complete-service-not-found.https.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Request for absent service. Must reject with ' +
-    'NotFoundError even when the services have previously been discovered.';
-
-bluetooth_test(() => getHealthThermometerDeviceWithServicesDiscovered({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['glucose']})
-    .then(({device}) => assert_promise_rejects_with_message(
-        device.gatt.getPrimaryService('glucose'),
-        new DOMException(
-            `No Services matching UUID ${glucose.uuid} found in Device.`,
-            'NotFoundError'))),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-discovery-complete-service-not-found.https.window.js
@@ -0,0 +1,23 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Request for absent service. Must reject with ' +
+    'NotFoundError even when the services have previously been discovered.';
+
+bluetooth_test(
+    () => getHealthThermometerDeviceWithServicesDiscovered({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['glucose']
+          })
+              .then(
+                  ({device}) => assert_promise_rejects_with_message(
+                      device.gatt.getPrimaryService('glucose'),
+                      new DOMException(
+                          `No Services matching UUID ${
+                              glucose.uuid} found in Device.`,
+                          'NotFoundError'))),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-garbage-collection-ran-during-error.https.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Garbage Collection ran during a getPrimaryService ' +
-    'call that failed. Should not crash.'
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. (Re)connect first ' +
-    'with `device.gatt.connect`.',
-    'NetworkError');
-let promise;
-
-bluetooth_test(() => getEmptyHealthThermometerDevice()
-    .then(({device}) => {
-      promise = assert_promise_rejects_with_message(
-          device.gatt.getPrimaryService('health_thermometer'),
-          expected);
-      // Disconnect called to clear attributeInstanceMap and allow the
-      // object to get garbage collected.
-      device.gatt.disconnect();
-      return runGarbageCollection();
-    })
-    .then(() => promise),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-garbage-collection-ran-during-error.https.window.js
@@ -0,0 +1,28 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Garbage Collection ran during a getPrimaryService ' +
+    'call that failed. Should not crash.'
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. (Re)connect first ' +
+        'with `device.gatt.connect`.',
+    'NetworkError');
+let promise;
+
+bluetooth_test(
+    () => getEmptyHealthThermometerDevice()
+              .then(({device}) => {
+                promise = assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryService('health_thermometer'),
+                    expected);
+                // Disconnect called to clear attributeInstanceMap and allow the
+                // object to get garbage collected.
+                device.gatt.disconnect();
+                return runGarbageCollection();
+              })
+              .then(() => promise),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-garbage-collection-ran-during-success.https.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Garbage Collection ran during a getPrimaryService call that ' +
-    'succeeds. Should not crash.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. ' +
-    '(Re)connect first with `device.gatt.connect`.',
-    'NetworkError');
-let promise;
-
-bluetooth_test(() => getHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}]
-    })
-    .then(({device}) => {
-      promise = assert_promise_rejects_with_message(
-          device.gatt.getPrimaryService('health_thermometer'),
-          expected);
-      device.gatt.disconnect();
-      return runGarbageCollection();
-    })
-    .then(() => promise),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-garbage-collection-ran-during-success.https.window.js
@@ -0,0 +1,28 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc =
+    'Garbage Collection ran during a getPrimaryService call that ' +
+    'succeeds. Should not crash.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. ' +
+        '(Re)connect first with `device.gatt.connect`.',
+    'NetworkError');
+let promise;
+
+bluetooth_test(
+    () => getHealthThermometerDevice(
+              {filters: [{services: ['health_thermometer']}]})
+              .then(({device}) => {
+                promise = assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryService('health_thermometer'),
+                    expected);
+                device.gatt.disconnect();
+                return runGarbageCollection();
+              })
+              .then(() => promise),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-get-different-service-after-reconnection.https.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Calls to getPrimaryService after a disconnection should return ' +
-    'a different object.';
-let device, services_first_connection, services_second_connection;
-
-bluetooth_test(() => getHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['generic_access']
-    })
-    .then(_ => ({device} = _))
-    .then(() => device.gatt.getPrimaryService('health_thermometer'))
-    .then(services => services_first_connection = services)
-    .then(() => device.gatt.disconnect())
-    .then(() => device.gatt.connect())
-    .then(() => device.gatt.getPrimaryService('health_thermometer'))
-    .then(services => services_second_connection = services)
-    .then(() => {
-      // Convert to arrays if necessary.
-      services_first_connection = [].concat(services_first_connection);
-      services_second_connection = [].concat(services_second_connection);
-
-      assert_equals(services_first_connection.length,
-          services_second_connection.length);
-
-      let first_connection_set = new Set(services_first_connection);
-      let second_connection_set = new Set(services_second_connection);
-
-      // The two sets should be disjoint.
-      let common_services = services_first_connection.filter(
-          val => second_connection_set.has(val));
-      assert_equals(common_services.length, 0);
-    }), test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-get-different-service-after-reconnection.https.window.js
@@ -0,0 +1,44 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc =
+    'Calls to getPrimaryService after a disconnection should return ' +
+    'a different object.';
+let device, services_first_connection, services_second_connection;
+
+bluetooth_test(
+    () => getHealthThermometerDevice({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['generic_access']
+          })
+              .then(_ => ({device} = _))
+              .then(() => device.gatt.getPrimaryService('health_thermometer'))
+              .then(services => services_first_connection = services)
+              .then(() => device.gatt.disconnect())
+              .then(() => device.gatt.connect())
+              .then(() => device.gatt.getPrimaryService('health_thermometer'))
+              .then(services => services_second_connection = services)
+              .then(() => {
+                // Convert to arrays if necessary.
+                services_first_connection =
+                    [].concat(services_first_connection);
+                services_second_connection =
+                    [].concat(services_second_connection);
+
+                assert_equals(
+                    services_first_connection.length,
+                    services_second_connection.length);
+
+                let first_connection_set = new Set(services_first_connection);
+                let second_connection_set = new Set(services_second_connection);
+
+                // The two sets should be disjoint.
+                let common_services = services_first_connection.filter(
+                    val => second_connection_set.has(val));
+                assert_equals(common_services.length, 0);
+              }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-get-same-object.https.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Calls to getPrimaryService should return the same object.';
-let device;
-
-bluetooth_test(() => getHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['generic_access']})
-    .then(({device}) => Promise.all([
-      device.gatt.getPrimaryService('health_thermometer'),
-      device.gatt.getPrimaryService('health_thermometer')]))
-    .then(([services_first_call, services_second_call]) => {
-      // Convert to arrays if necessary.
-      services_first_call = [].concat(services_first_call);
-      services_second_call = [].concat(services_second_call);
-
-      assert_equals(services_first_call.length, services_second_call.length);
-
-      let first_call_set = new Set(services_first_call);
-      assert_equals(services_first_call.length, first_call_set.size);
-      let second_call_set = new Set(services_second_call);
-      assert_equals(services_second_call.length, second_call_set.size);
-
-      services_first_call.forEach(service => {
-        assert_true(second_call_set.has(service))
-      });
-
-      services_second_call.forEach(service => {
-        assert_true(first_call_set.has(service));
-      });
-    }), test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-get-same-object.https.window.js
@@ -0,0 +1,41 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Calls to getPrimaryService should return the same object.';
+let device;
+
+bluetooth_test(
+    () => getHealthThermometerDevice({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['generic_access']
+          })
+              .then(({device}) => Promise.all([
+                device.gatt.getPrimaryService('health_thermometer'),
+                device.gatt.getPrimaryService('health_thermometer')
+              ]))
+              .then(([services_first_call, services_second_call]) => {
+                // Convert to arrays if necessary.
+                services_first_call = [].concat(services_first_call);
+                services_second_call = [].concat(services_second_call);
+
+                assert_equals(
+                    services_first_call.length, services_second_call.length);
+
+                let first_call_set = new Set(services_first_call);
+                assert_equals(services_first_call.length, first_call_set.size);
+                let second_call_set = new Set(services_second_call);
+                assert_equals(
+                    services_second_call.length, second_call_set.size);
+
+                services_first_call.forEach(
+                    service => {assert_true(second_call_set.has(service))});
+
+                services_second_call.forEach(service => {
+                  assert_true(first_call_set.has(service));
+                });
+              }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-invalid-service-name.https.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Wrong Service name. Reject with TypeError.';
-const expected = new DOMException(
-    "Failed to execute 'getPrimaryService' on " +
-    "'BluetoothRemoteGATTServer': Invalid Service name: " +
-    "'wrong_name'. It must be a valid UUID alias (e.g. 0x1234), " +
-    "UUID (lowercase hex characters e.g. " +
-    "'00001234-0000-1000-8000-00805f9b34fb'), " +
-    "or recognized standard name from " +
-    "https://www.bluetooth.com/specifications/gatt/services" +
-    " e.g. 'alert_notification'.",
-    'TypeError');
-
-bluetooth_test(() => getConnectedHealthThermometerDevice()
-    .then(({device}) => assert_promise_rejects_with_message(
-        device.gatt.getPrimaryService('wrong_name'),
-        expected,
-        'Wrong Service name passed.')),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-invalid-service-name.https.window.js
@@ -0,0 +1,25 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Wrong Service name. Reject with TypeError.';
+const expected = new DOMException(
+    'Failed to execute \'getPrimaryService\' on ' +
+        '\'BluetoothRemoteGATTServer\': Invalid Service name: ' +
+        '\'wrong_name\'. It must be a valid UUID alias (e.g. 0x1234), ' +
+        'UUID (lowercase hex characters e.g. ' +
+        '\'00001234-0000-1000-8000-00805f9b34fb\'), ' +
+        'or recognized standard name from ' +
+        'https://www.bluetooth.com/specifications/gatt/services' +
+        ' e.g. \'alert_notification\'.',
+    'TypeError');
+
+bluetooth_test(
+    () => getConnectedHealthThermometerDevice().then(
+        ({device}) => assert_promise_rejects_with_message(
+            device.gatt.getPrimaryService('wrong_name'), expected,
+            'Wrong Service name passed.')),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-absent-service.https.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Request for absent service without permission. ' +
-    'Reject with SecurityError.';
-const expected = new DOMException(
-    'Origin is not allowed to access the service. Tip: Add the service UUID ' +
-    'to \'optionalServices\' in requestDevice() options. ' +
-    'https://goo.gl/HxfxSQ',
-    'SecurityError');
-
-bluetooth_test(() => getConnectedHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}]
-    })
-    .then(({device}) => Promise.all([
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryService(glucose.alias), expected),
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryService(glucose.name), expected),
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryService(glucose.uuid), expected)])),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-absent-service.https.window.js
@@ -0,0 +1,27 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Request for absent service without permission. ' +
+    'Reject with SecurityError.';
+const expected = new DOMException(
+    'Origin is not allowed to access the service. Tip: Add the service UUID ' +
+        'to \'optionalServices\' in requestDevice() options. ' +
+        'https://goo.gl/HxfxSQ',
+    'SecurityError');
+
+bluetooth_test(
+    () => getConnectedHealthThermometerDevice(
+              {filters: [{services: ['health_thermometer']}]})
+              .then(({device}) => Promise.all([
+                assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryService(glucose.alias), expected),
+                assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryService(glucose.name), expected),
+                assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryService(glucose.uuid), expected)
+              ])),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-for-any-service.https.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Request for present service without permission to access ' +
-    'any service. Reject with SecurityError.';
-const expected = new DOMException(
-    'Origin is not allowed to access any service. Tip: Add the service ' +
-    'UUID to \'optionalServices\' in requestDevice() options. ' +
-    'https://goo.gl/HxfxSQ',
-     'SecurityError');
-
-bluetooth_test(() => getConnectedHealthThermometerDevice({acceptAllDevices: true})
-    .then(({device}) => assert_promise_rejects_with_message(
-        device.gatt.getPrimaryService('heart_rate'),
-        expected)),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-for-any-service.https.window.js
@@ -0,0 +1,21 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Request for present service without permission to access ' +
+    'any service. Reject with SecurityError.';
+const expected = new DOMException(
+    'Origin is not allowed to access any service. Tip: Add the service ' +
+        'UUID to \'optionalServices\' in requestDevice() options. ' +
+        'https://goo.gl/HxfxSQ',
+    'SecurityError');
+
+bluetooth_test(
+    () => getConnectedHealthThermometerDevice({acceptAllDevices: true})
+              .then(
+                  ({device}) => assert_promise_rejects_with_message(
+                      device.gatt.getPrimaryService('heart_rate'), expected)),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-present-service.https.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Request for present service without permission. ' +
-    'Reject with SecurityError.';
-const expected = new DOMException(
-    'Origin is not allowed to access the service. Tip: Add the service UUID ' +
-    'to \'optionalServices\' in requestDevice() options. https://goo.gl/HxfxSQ',
-    'SecurityError');
-
-bluetooth_test(() => getConnectedHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}]
-    })
-    .then(({device}) => Promise.all([
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryService(generic_access.alias), expected),
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryService(generic_access.name), expected),
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryService(generic_access.uuid), expected)])),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-no-permission-present-service.https.window.js
@@ -0,0 +1,28 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Request for present service without permission. ' +
+    'Reject with SecurityError.';
+const expected = new DOMException(
+    'Origin is not allowed to access the service. Tip: Add the service UUID ' +
+        'to \'optionalServices\' in requestDevice() options. https://goo.gl/HxfxSQ',
+    'SecurityError');
+
+bluetooth_test(
+    () =>
+        getConnectedHealthThermometerDevice(
+            {filters: [{services: ['health_thermometer']}]})
+            .then(({device}) => Promise.all([
+              assert_promise_rejects_with_message(
+                  device.gatt.getPrimaryService(generic_access.alias),
+                  expected),
+              assert_promise_rejects_with_message(
+                  device.gatt.getPrimaryService(generic_access.name), expected),
+              assert_promise_rejects_with_message(
+                  device.gatt.getPrimaryService(generic_access.uuid), expected)
+            ])),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-service-not-found.https.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Request for absent service. Reject with NotFoundError.';
-
-bluetooth_test(() => getHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['glucose']
-    })
-    .then(({device}) => assert_promise_rejects_with_message(
-        device.gatt.getPrimaryService('glucose'),
-        new DOMException(
-            `No Services matching UUID ${glucose.uuid} found in Device.`,
-            'NotFoundError'))),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryService/gen-service-not-found.https.window.js
@@ -0,0 +1,22 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Request for absent service. Reject with NotFoundError.';
+
+bluetooth_test(
+    () => getHealthThermometerDevice({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['glucose']
+          })
+              .then(
+                  ({device}) => assert_promise_rejects_with_message(
+                      device.gatt.getPrimaryService('glucose'),
+                      new DOMException(
+                          `No Services matching UUID ${
+                              glucose.uuid} found in Device.`,
+                          'NotFoundError'))),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-before-with-uuid.https.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'disconnect() called before getPrimaryServices. ' +
-    'Reject with NetworkError.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
-    'first with `device.gatt.connect`.',
-    'NetworkError');
-let device;
-
-bluetooth_test(() => getConnectedHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['generic_access']
-    })
-    .then(_ => ({device} = _))
-    .then(() => device.gatt.disconnect())
-    .then(() => assert_promise_rejects_with_message(
-        device.gatt.getPrimaryServices('health_thermometer'),
-        expected)),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-before-with-uuid.https.window.js
@@ -0,0 +1,27 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'disconnect() called before getPrimaryServices. ' +
+    'Reject with NetworkError.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
+        'first with `device.gatt.connect`.',
+    'NetworkError');
+let device;
+
+bluetooth_test(
+    () => getConnectedHealthThermometerDevice({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['generic_access']
+          })
+              .then(_ => ({device} = _))
+              .then(() => device.gatt.disconnect())
+              .then(
+                  () => assert_promise_rejects_with_message(
+                      device.gatt.getPrimaryServices('health_thermometer'),
+                      expected)),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-before.https.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'disconnect() called before getPrimaryServices. ' +
-    'Reject with NetworkError.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
-    'first with `device.gatt.connect`.',
-    'NetworkError');
-let device;
-
-bluetooth_test(() => getConnectedHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['generic_access']
-    })
-    .then(_ => ({device} = _))
-    .then(() => device.gatt.disconnect())
-    .then(() => assert_promise_rejects_with_message(
-        device.gatt.getPrimaryServices(),
-        expected)),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-before.https.window.js
@@ -0,0 +1,26 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'disconnect() called before getPrimaryServices. ' +
+    'Reject with NetworkError.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
+        'first with `device.gatt.connect`.',
+    'NetworkError');
+let device;
+
+bluetooth_test(
+    () => getConnectedHealthThermometerDevice({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['generic_access']
+          })
+              .then(_ => ({device} = _))
+              .then(() => device.gatt.disconnect())
+              .then(
+                  () => assert_promise_rejects_with_message(
+                      device.gatt.getPrimaryServices(), expected)),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-during-error-with-uuid.https.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'disconnect() called during a getPrimaryServices ' +
-    'call that fails. Reject with NetworkError.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
-    'first with `device.gatt.connect`.', 'NetworkError');
-let device;
-
-bluetooth_test(() => getEmptyHealthThermometerDevice()
-    .then(_ => ({device} = _))
-    .then(() => {
-      let promise = assert_promise_rejects_with_message(
-        device.gatt.getPrimaryServices('health_thermometer'),
-        expected)
-      device.gatt.disconnect();
-      return promise;
-    }),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-during-error-with-uuid.https.window.js
@@ -0,0 +1,24 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'disconnect() called during a getPrimaryServices ' +
+    'call that fails. Reject with NetworkError.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
+        'first with `device.gatt.connect`.',
+    'NetworkError');
+let device;
+
+bluetooth_test(
+    () =>
+        getEmptyHealthThermometerDevice().then(_ => ({device} = _)).then(() => {
+          let promise = assert_promise_rejects_with_message(
+              device.gatt.getPrimaryServices('health_thermometer'), expected)
+          device.gatt.disconnect();
+          return promise;
+        }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-during-error.https.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'disconnect() called during a getPrimaryServices ' +
-    'call that fails. Reject with NetworkError.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
-    'first with `device.gatt.connect`.', 'NetworkError');
-let device;
-
-bluetooth_test(() => getEmptyHealthThermometerDevice()
-    .then(_ => ({device} = _))
-    .then(() => {
-      let promise = assert_promise_rejects_with_message(
-        device.gatt.getPrimaryServices(),
-        expected)
-      device.gatt.disconnect();
-      return promise;
-    }),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-during-error.https.window.js
@@ -0,0 +1,24 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'disconnect() called during a getPrimaryServices ' +
+    'call that fails. Reject with NetworkError.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
+        'first with `device.gatt.connect`.',
+    'NetworkError');
+let device;
+
+bluetooth_test(
+    () =>
+        getEmptyHealthThermometerDevice().then(_ => ({device} = _)).then(() => {
+          let promise = assert_promise_rejects_with_message(
+              device.gatt.getPrimaryServices(), expected)
+          device.gatt.disconnect();
+          return promise;
+        }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-during-success-with-uuid.https.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'disconnect() called during a getPrimaryServices call that ' +
-    'succeeds. Reject with NetworkError.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
-    'first with `device.gatt.connect`.',
-     'NetworkError');
-
-bluetooth_test(() => getHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['generic_access']
-    })
-    .then(({device}) => {
-      let promise = assert_promise_rejects_with_message(
-        device.gatt.getPrimaryServices('health_thermometer'),
-        expected);
-      device.gatt.disconnect();
-      return promise;
-    }), test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-during-success-with-uuid.https.window.js
@@ -0,0 +1,25 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'disconnect() called during a getPrimaryServices call that ' +
+    'succeeds. Reject with NetworkError.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
+        'first with `device.gatt.connect`.',
+    'NetworkError');
+
+bluetooth_test(
+    () => getHealthThermometerDevice({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['generic_access']
+          }).then(({device}) => {
+      let promise = assert_promise_rejects_with_message(
+          device.gatt.getPrimaryServices('health_thermometer'), expected);
+      device.gatt.disconnect();
+      return promise;
+    }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-during-success.https.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'disconnect() called during a getPrimaryServices call that ' +
-    'succeeds. Reject with NetworkError.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
-    'first with `device.gatt.connect`.',
-     'NetworkError');
-
-bluetooth_test(() => getHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['generic_access']
-    })
-    .then(({device}) => {
-      let promise = assert_promise_rejects_with_message(
-        device.gatt.getPrimaryServices(),
-        expected);
-      device.gatt.disconnect();
-      return promise;
-    }), test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-called-during-success.https.window.js
@@ -0,0 +1,25 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'disconnect() called during a getPrimaryServices call that ' +
+    'succeeds. Reject with NetworkError.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
+        'first with `device.gatt.connect`.',
+    'NetworkError');
+
+bluetooth_test(
+    () => getHealthThermometerDevice({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['generic_access']
+          }).then(({device}) => {
+      let promise = assert_promise_rejects_with_message(
+          device.gatt.getPrimaryServices(), expected);
+      device.gatt.disconnect();
+      return promise;
+    }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-invalidates-objects-with-uuid.https.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Calls on services after we disconnect and connect again. '+
-   'Should reject with InvalidStateError.';
-let device, services;
-
-bluetooth_test(() => getHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}]
-    })
-    .then(_ => ({device} = _))
-    .then(() => device.gatt.getPrimaryServices('health_thermometer'))
-    // Convert to array if necessary.
-    .then(s => services = [].concat(s))
-    .then(() => device.gatt.disconnect())
-    .then(() => device.gatt.connect())
-    .then(() => {
-      let promises = Promise.resolve();
-      for (let service of services) {
-        let error = new DOMException(
-          `Service with UUID ${service.uuid} is no longer valid. Remember ` +
-          `to retrieve the service again after reconnecting.`,
-          'InvalidStateError');
-        promises = promises.then(() =>
-            assert_promise_rejects_with_message(
-                service.getCharacteristic('measurement_interval'),
-                error));
-        promises = promises.then(() =>
-            assert_promise_rejects_with_message(
-                service.getCharacteristics(),
-                error));
-        promises = promises.then(() =>
-            assert_promise_rejects_with_message(
-                service.getCharacteristics('measurement_interval'),
-                error));
-      }
-      return promises;
-    }), test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-invalidates-objects-with-uuid.https.window.js
@@ -0,0 +1,43 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Calls on services after we disconnect and connect again. ' +
+    'Should reject with InvalidStateError.';
+let device, services;
+
+bluetooth_test(
+    () => getHealthThermometerDevice(
+              {filters: [{services: ['health_thermometer']}]})
+              .then(_ => ({device} = _))
+              .then(() => device.gatt.getPrimaryServices('health_thermometer'))
+              // Convert to array if necessary.
+              .then(s => services = [].concat(s))
+              .then(() => device.gatt.disconnect())
+              .then(() => device.gatt.connect())
+              .then(() => {
+                let promises = Promise.resolve();
+                for (let service of services) {
+                  let error = new DOMException(
+                      `Service with UUID ${
+                          service.uuid} is no longer valid. Remember ` +
+                          `to retrieve the service again after reconnecting.`,
+                      'InvalidStateError');
+                  promises = promises.then(
+                      () => assert_promise_rejects_with_message(
+                          service.getCharacteristic('measurement_interval'),
+                          error));
+                  promises = promises.then(
+                      () => assert_promise_rejects_with_message(
+                          service.getCharacteristics(), error));
+                  promises = promises.then(
+                      () => assert_promise_rejects_with_message(
+                          service.getCharacteristics('measurement_interval'),
+                          error));
+                }
+                return promises;
+              }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-invalidates-objects.https.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Calls on services after we disconnect and connect again. '+
-   'Should reject with InvalidStateError.';
-let device, services;
-
-bluetooth_test(() => getHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}]
-    })
-    .then(_ => ({device} = _))
-    .then(() => device.gatt.getPrimaryServices())
-    // Convert to array if necessary.
-    .then(s => services = [].concat(s))
-    .then(() => device.gatt.disconnect())
-    .then(() => device.gatt.connect())
-    .then(() => {
-      let promises = Promise.resolve();
-      for (let service of services) {
-        let error = new DOMException(
-          `Service with UUID ${service.uuid} is no longer valid. Remember ` +
-          `to retrieve the service again after reconnecting.`,
-          'InvalidStateError');
-        promises = promises.then(() =>
-            assert_promise_rejects_with_message(
-                service.getCharacteristic('measurement_interval'),
-                error));
-        promises = promises.then(() =>
-            assert_promise_rejects_with_message(
-                service.getCharacteristics(),
-                error));
-        promises = promises.then(() =>
-            assert_promise_rejects_with_message(
-                service.getCharacteristics('measurement_interval'),
-                error));
-      }
-      return promises;
-    }), test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnect-invalidates-objects.https.window.js
@@ -0,0 +1,43 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Calls on services after we disconnect and connect again. ' +
+    'Should reject with InvalidStateError.';
+let device, services;
+
+bluetooth_test(
+    () => getHealthThermometerDevice(
+              {filters: [{services: ['health_thermometer']}]})
+              .then(_ => ({device} = _))
+              .then(() => device.gatt.getPrimaryServices())
+              // Convert to array if necessary.
+              .then(s => services = [].concat(s))
+              .then(() => device.gatt.disconnect())
+              .then(() => device.gatt.connect())
+              .then(() => {
+                let promises = Promise.resolve();
+                for (let service of services) {
+                  let error = new DOMException(
+                      `Service with UUID ${
+                          service.uuid} is no longer valid. Remember ` +
+                          `to retrieve the service again after reconnecting.`,
+                      'InvalidStateError');
+                  promises = promises.then(
+                      () => assert_promise_rejects_with_message(
+                          service.getCharacteristic('measurement_interval'),
+                          error));
+                  promises = promises.then(
+                      () => assert_promise_rejects_with_message(
+                          service.getCharacteristics(), error));
+                  promises = promises.then(
+                      () => assert_promise_rejects_with_message(
+                          service.getCharacteristics('measurement_interval'),
+                          error));
+                }
+                return promises;
+              }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnected-device-with-uuid.https.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'getPrimaryServices called before connecting. Reject with ' +
-    'NetworkError.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
-    'first with `device.gatt.connect`.',
-    'NetworkError');
-
-bluetooth_test(() => getDiscoveredHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['generic_access']
-    })
-    .then(({device}) => assert_promise_rejects_with_message(
-        device.gatt.getPrimaryServices('health_thermometer'),
-        expected)),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnected-device-with-uuid.https.window.js
@@ -0,0 +1,24 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'getPrimaryServices called before connecting. Reject with ' +
+    'NetworkError.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
+        'first with `device.gatt.connect`.',
+    'NetworkError');
+
+bluetooth_test(
+    () => getDiscoveredHealthThermometerDevice({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['generic_access']
+          })
+              .then(
+                  ({device}) => assert_promise_rejects_with_message(
+                      device.gatt.getPrimaryServices('health_thermometer'),
+                      expected)),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnected-device.https.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'getPrimaryServices called before connecting. Reject with ' +
-    'NetworkError.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
-    'first with `device.gatt.connect`.',
-    'NetworkError');
-
-bluetooth_test(() => getDiscoveredHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['generic_access']
-    })
-    .then(({device}) => assert_promise_rejects_with_message(
-        device.gatt.getPrimaryServices(),
-        expected)),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-disconnected-device.https.window.js
@@ -0,0 +1,23 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'getPrimaryServices called before connecting. Reject with ' +
+    'NetworkError.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. (Re)connect ' +
+        'first with `device.gatt.connect`.',
+    'NetworkError');
+
+bluetooth_test(
+    () => getDiscoveredHealthThermometerDevice({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['generic_access']
+          })
+              .then(
+                  ({device}) => assert_promise_rejects_with_message(
+                      device.gatt.getPrimaryServices(), expected)),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-discovery-complete-no-permission-absent-service-with-uuid.https.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Request for absent service without permission. Should ' +
-    'Reject with SecurityError even if services have been discovered already.';
-const expected = new DOMException(
-    'Origin is not allowed to access the service. Tip: Add the service ' +
-    'UUID to \'optionalServices\' in requestDevice() options. ' +
-    'https://goo.gl/HxfxSQ',
-    'SecurityError');
-let device;
-
-bluetooth_test(() => getHealthThermometerDeviceWithServicesDiscovered({
-      filters: [{services: ['health_thermometer']}]
-    })
-    .then(_ => ({device} = _))
-    .then(() => Promise.all([
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryServices(glucose.alias), expected),
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryServices(glucose.name), expected),
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryServices(glucose.uuid), expected)])),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-discovery-complete-no-permission-absent-service-with-uuid.https.window.js
@@ -0,0 +1,29 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Request for absent service without permission. Should ' +
+    'Reject with SecurityError even if services have been discovered already.';
+const expected = new DOMException(
+    'Origin is not allowed to access the service. Tip: Add the service ' +
+        'UUID to \'optionalServices\' in requestDevice() options. ' +
+        'https://goo.gl/HxfxSQ',
+    'SecurityError');
+let device;
+
+bluetooth_test(
+    () => getHealthThermometerDeviceWithServicesDiscovered(
+              {filters: [{services: ['health_thermometer']}]})
+              .then(_ => ({device} = _))
+              .then(() => Promise.all([
+                assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryServices(glucose.alias), expected),
+                assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryServices(glucose.name), expected),
+                assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryServices(glucose.uuid), expected)
+              ])),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-discovery-complete-service-not-found-with-uuid.https.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Request for absent service. Must reject with ' +
-    'NotFoundError even when the services have previously been discovered.';
-
-bluetooth_test(() => getHealthThermometerDeviceWithServicesDiscovered({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['glucose']})
-    .then(({device}) => assert_promise_rejects_with_message(
-        device.gatt.getPrimaryServices('glucose'),
-        new DOMException(
-            `No Services matching UUID ${glucose.uuid} found in Device.`,
-            'NotFoundError'))),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-discovery-complete-service-not-found-with-uuid.https.window.js
@@ -0,0 +1,23 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Request for absent service. Must reject with ' +
+    'NotFoundError even when the services have previously been discovered.';
+
+bluetooth_test(
+    () => getHealthThermometerDeviceWithServicesDiscovered({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['glucose']
+          })
+              .then(
+                  ({device}) => assert_promise_rejects_with_message(
+                      device.gatt.getPrimaryServices('glucose'),
+                      new DOMException(
+                          `No Services matching UUID ${
+                              glucose.uuid} found in Device.`,
+                          'NotFoundError'))),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-garbage-collection-ran-during-error-with-uuid.https.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Garbage Collection ran during a getPrimaryServices ' +
-    'call that failed. Should not crash.'
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. (Re)connect first ' +
-    'with `device.gatt.connect`.',
-    'NetworkError');
-let promise;
-
-bluetooth_test(() => getEmptyHealthThermometerDevice()
-    .then(({device}) => {
-      promise = assert_promise_rejects_with_message(
-          device.gatt.getPrimaryServices('health_thermometer'),
-          expected);
-      // Disconnect called to clear attributeInstanceMap and allow the
-      // object to get garbage collected.
-      device.gatt.disconnect();
-      return runGarbageCollection();
-    })
-    .then(() => promise),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-garbage-collection-ran-during-error-with-uuid.https.window.js
@@ -0,0 +1,28 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Garbage Collection ran during a getPrimaryServices ' +
+    'call that failed. Should not crash.'
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. (Re)connect first ' +
+        'with `device.gatt.connect`.',
+    'NetworkError');
+let promise;
+
+bluetooth_test(
+    () => getEmptyHealthThermometerDevice()
+              .then(({device}) => {
+                promise = assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryServices('health_thermometer'),
+                    expected);
+                // Disconnect called to clear attributeInstanceMap and allow the
+                // object to get garbage collected.
+                device.gatt.disconnect();
+                return runGarbageCollection();
+              })
+              .then(() => promise),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-garbage-collection-ran-during-error.https.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Garbage Collection ran during a getPrimaryServices ' +
-    'call that failed. Should not crash.'
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. (Re)connect first ' +
-    'with `device.gatt.connect`.',
-    'NetworkError');
-let promise;
-
-bluetooth_test(() => getEmptyHealthThermometerDevice()
-    .then(({device}) => {
-      promise = assert_promise_rejects_with_message(
-          device.gatt.getPrimaryServices(),
-          expected);
-      // Disconnect called to clear attributeInstanceMap and allow the
-      // object to get garbage collected.
-      device.gatt.disconnect();
-      return runGarbageCollection();
-    })
-    .then(() => promise),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-garbage-collection-ran-during-error.https.window.js
@@ -0,0 +1,27 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Garbage Collection ran during a getPrimaryServices ' +
+    'call that failed. Should not crash.'
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. (Re)connect first ' +
+        'with `device.gatt.connect`.',
+    'NetworkError');
+let promise;
+
+bluetooth_test(
+    () => getEmptyHealthThermometerDevice()
+              .then(({device}) => {
+                promise = assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryServices(), expected);
+                // Disconnect called to clear attributeInstanceMap and allow the
+                // object to get garbage collected.
+                device.gatt.disconnect();
+                return runGarbageCollection();
+              })
+              .then(() => promise),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-garbage-collection-ran-during-success-with-uuid.https.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Garbage Collection ran during a getPrimaryServices call that ' +
-    'succeeds. Should not crash.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. ' +
-    '(Re)connect first with `device.gatt.connect`.',
-    'NetworkError');
-let promise;
-
-bluetooth_test(() => getHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}]
-    })
-    .then(({device}) => {
-      promise = assert_promise_rejects_with_message(
-          device.gatt.getPrimaryServices('health_thermometer'),
-          expected);
-      device.gatt.disconnect();
-      return runGarbageCollection();
-    })
-    .then(() => promise),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-garbage-collection-ran-during-success-with-uuid.https.window.js
@@ -0,0 +1,28 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc =
+    'Garbage Collection ran during a getPrimaryServices call that ' +
+    'succeeds. Should not crash.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. ' +
+        '(Re)connect first with `device.gatt.connect`.',
+    'NetworkError');
+let promise;
+
+bluetooth_test(
+    () => getHealthThermometerDevice(
+              {filters: [{services: ['health_thermometer']}]})
+              .then(({device}) => {
+                promise = assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryServices('health_thermometer'),
+                    expected);
+                device.gatt.disconnect();
+                return runGarbageCollection();
+              })
+              .then(() => promise),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-garbage-collection-ran-during-success.https.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Garbage Collection ran during a getPrimaryServices call that ' +
-    'succeeds. Should not crash.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve services. ' +
-    '(Re)connect first with `device.gatt.connect`.',
-    'NetworkError');
-let promise;
-
-bluetooth_test(() => getHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}]
-    })
-    .then(({device}) => {
-      promise = assert_promise_rejects_with_message(
-          device.gatt.getPrimaryServices(),
-          expected);
-      device.gatt.disconnect();
-      return runGarbageCollection();
-    })
-    .then(() => promise),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-garbage-collection-ran-during-success.https.window.js
@@ -0,0 +1,27 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc =
+    'Garbage Collection ran during a getPrimaryServices call that ' +
+    'succeeds. Should not crash.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve services. ' +
+        '(Re)connect first with `device.gatt.connect`.',
+    'NetworkError');
+let promise;
+
+bluetooth_test(
+    () => getHealthThermometerDevice(
+              {filters: [{services: ['health_thermometer']}]})
+              .then(({device}) => {
+                promise = assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryServices(), expected);
+                device.gatt.disconnect();
+                return runGarbageCollection();
+              })
+              .then(() => promise),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-get-different-service-after-reconnection-with-uuid.https.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Calls to getPrimaryServices after a disconnection should return ' +
-    'a different object.';
-let device, services_first_connection, services_second_connection;
-
-bluetooth_test(() => getHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['generic_access']
-    })
-    .then(_ => ({device} = _))
-    .then(() => device.gatt.getPrimaryServices('health_thermometer'))
-    .then(services => services_first_connection = services)
-    .then(() => device.gatt.disconnect())
-    .then(() => device.gatt.connect())
-    .then(() => device.gatt.getPrimaryServices('health_thermometer'))
-    .then(services => services_second_connection = services)
-    .then(() => {
-      // Convert to arrays if necessary.
-      services_first_connection = [].concat(services_first_connection);
-      services_second_connection = [].concat(services_second_connection);
-
-      assert_equals(services_first_connection.length,
-          services_second_connection.length);
-
-      let first_connection_set = new Set(services_first_connection);
-      let second_connection_set = new Set(services_second_connection);
-
-      // The two sets should be disjoint.
-      let common_services = services_first_connection.filter(
-          val => second_connection_set.has(val));
-      assert_equals(common_services.length, 0);
-    }), test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-get-different-service-after-reconnection-with-uuid.https.window.js
@@ -0,0 +1,44 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc =
+    'Calls to getPrimaryServices after a disconnection should return ' +
+    'a different object.';
+let device, services_first_connection, services_second_connection;
+
+bluetooth_test(
+    () => getHealthThermometerDevice({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['generic_access']
+          })
+              .then(_ => ({device} = _))
+              .then(() => device.gatt.getPrimaryServices('health_thermometer'))
+              .then(services => services_first_connection = services)
+              .then(() => device.gatt.disconnect())
+              .then(() => device.gatt.connect())
+              .then(() => device.gatt.getPrimaryServices('health_thermometer'))
+              .then(services => services_second_connection = services)
+              .then(() => {
+                // Convert to arrays if necessary.
+                services_first_connection =
+                    [].concat(services_first_connection);
+                services_second_connection =
+                    [].concat(services_second_connection);
+
+                assert_equals(
+                    services_first_connection.length,
+                    services_second_connection.length);
+
+                let first_connection_set = new Set(services_first_connection);
+                let second_connection_set = new Set(services_second_connection);
+
+                // The two sets should be disjoint.
+                let common_services = services_first_connection.filter(
+                    val => second_connection_set.has(val));
+                assert_equals(common_services.length, 0);
+              }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-get-different-service-after-reconnection.https.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Calls to getPrimaryServices after a disconnection should return ' +
-    'a different object.';
-let device, services_first_connection, services_second_connection;
-
-bluetooth_test(() => getHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['generic_access']
-    })
-    .then(_ => ({device} = _))
-    .then(() => device.gatt.getPrimaryServices())
-    .then(services => services_first_connection = services)
-    .then(() => device.gatt.disconnect())
-    .then(() => device.gatt.connect())
-    .then(() => device.gatt.getPrimaryServices())
-    .then(services => services_second_connection = services)
-    .then(() => {
-      // Convert to arrays if necessary.
-      services_first_connection = [].concat(services_first_connection);
-      services_second_connection = [].concat(services_second_connection);
-
-      assert_equals(services_first_connection.length,
-          services_second_connection.length);
-
-      let first_connection_set = new Set(services_first_connection);
-      let second_connection_set = new Set(services_second_connection);
-
-      // The two sets should be disjoint.
-      let common_services = services_first_connection.filter(
-          val => second_connection_set.has(val));
-      assert_equals(common_services.length, 0);
-    }), test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-get-different-service-after-reconnection.https.window.js
@@ -0,0 +1,44 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc =
+    'Calls to getPrimaryServices after a disconnection should return ' +
+    'a different object.';
+let device, services_first_connection, services_second_connection;
+
+bluetooth_test(
+    () => getHealthThermometerDevice({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['generic_access']
+          })
+              .then(_ => ({device} = _))
+              .then(() => device.gatt.getPrimaryServices())
+              .then(services => services_first_connection = services)
+              .then(() => device.gatt.disconnect())
+              .then(() => device.gatt.connect())
+              .then(() => device.gatt.getPrimaryServices())
+              .then(services => services_second_connection = services)
+              .then(() => {
+                // Convert to arrays if necessary.
+                services_first_connection =
+                    [].concat(services_first_connection);
+                services_second_connection =
+                    [].concat(services_second_connection);
+
+                assert_equals(
+                    services_first_connection.length,
+                    services_second_connection.length);
+
+                let first_connection_set = new Set(services_first_connection);
+                let second_connection_set = new Set(services_second_connection);
+
+                // The two sets should be disjoint.
+                let common_services = services_first_connection.filter(
+                    val => second_connection_set.has(val));
+                assert_equals(common_services.length, 0);
+              }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-get-same-object-with-uuid.https.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Calls to getPrimaryServices should return the same object.';
-let device;
-
-bluetooth_test(() => getHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['generic_access']})
-    .then(({device}) => Promise.all([
-      device.gatt.getPrimaryServices('health_thermometer'),
-      device.gatt.getPrimaryServices('health_thermometer')]))
-    .then(([services_first_call, services_second_call]) => {
-      // Convert to arrays if necessary.
-      services_first_call = [].concat(services_first_call);
-      services_second_call = [].concat(services_second_call);
-
-      assert_equals(services_first_call.length, services_second_call.length);
-
-      let first_call_set = new Set(services_first_call);
-      assert_equals(services_first_call.length, first_call_set.size);
-      let second_call_set = new Set(services_second_call);
-      assert_equals(services_second_call.length, second_call_set.size);
-
-      services_first_call.forEach(service => {
-        assert_true(second_call_set.has(service))
-      });
-
-      services_second_call.forEach(service => {
-        assert_true(first_call_set.has(service));
-      });
-    }), test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-get-same-object-with-uuid.https.window.js
@@ -0,0 +1,41 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Calls to getPrimaryServices should return the same object.';
+let device;
+
+bluetooth_test(
+    () => getHealthThermometerDevice({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['generic_access']
+          })
+              .then(({device}) => Promise.all([
+                device.gatt.getPrimaryServices('health_thermometer'),
+                device.gatt.getPrimaryServices('health_thermometer')
+              ]))
+              .then(([services_first_call, services_second_call]) => {
+                // Convert to arrays if necessary.
+                services_first_call = [].concat(services_first_call);
+                services_second_call = [].concat(services_second_call);
+
+                assert_equals(
+                    services_first_call.length, services_second_call.length);
+
+                let first_call_set = new Set(services_first_call);
+                assert_equals(services_first_call.length, first_call_set.size);
+                let second_call_set = new Set(services_second_call);
+                assert_equals(
+                    services_second_call.length, second_call_set.size);
+
+                services_first_call.forEach(
+                    service => {assert_true(second_call_set.has(service))});
+
+                services_second_call.forEach(service => {
+                  assert_true(first_call_set.has(service));
+                });
+              }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-get-same-object.https.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Calls to getPrimaryServices should return the same object.';
-let device;
-
-bluetooth_test(() => getHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['generic_access']})
-    .then(({device}) => Promise.all([
-      device.gatt.getPrimaryServices(),
-      device.gatt.getPrimaryServices()]))
-    .then(([services_first_call, services_second_call]) => {
-      // Convert to arrays if necessary.
-      services_first_call = [].concat(services_first_call);
-      services_second_call = [].concat(services_second_call);
-
-      assert_equals(services_first_call.length, services_second_call.length);
-
-      let first_call_set = new Set(services_first_call);
-      assert_equals(services_first_call.length, first_call_set.size);
-      let second_call_set = new Set(services_second_call);
-      assert_equals(services_second_call.length, second_call_set.size);
-
-      services_first_call.forEach(service => {
-        assert_true(second_call_set.has(service))
-      });
-
-      services_second_call.forEach(service => {
-        assert_true(first_call_set.has(service));
-      });
-    }), test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-get-same-object.https.window.js
@@ -0,0 +1,40 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Calls to getPrimaryServices should return the same object.';
+let device;
+
+bluetooth_test(
+    () =>
+        getHealthThermometerDevice({
+          filters: [{services: ['health_thermometer']}],
+          optionalServices: ['generic_access']
+        })
+            .then(({device}) => Promise.all([
+              device.gatt.getPrimaryServices(), device.gatt.getPrimaryServices()
+            ]))
+            .then(([services_first_call, services_second_call]) => {
+              // Convert to arrays if necessary.
+              services_first_call = [].concat(services_first_call);
+              services_second_call = [].concat(services_second_call);
+
+              assert_equals(
+                  services_first_call.length, services_second_call.length);
+
+              let first_call_set = new Set(services_first_call);
+              assert_equals(services_first_call.length, first_call_set.size);
+              let second_call_set = new Set(services_second_call);
+              assert_equals(services_second_call.length, second_call_set.size);
+
+              services_first_call.forEach(
+                  service => {assert_true(second_call_set.has(service))});
+
+              services_second_call.forEach(service => {
+                assert_true(first_call_set.has(service));
+              });
+            }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-invalid-service-name.https.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Wrong Service name. Reject with TypeError.';
-const expected = new DOMException(
-    "Failed to execute 'getPrimaryServices' on " +
-    "'BluetoothRemoteGATTServer': Invalid Service name: " +
-    "'wrong_name'. It must be a valid UUID alias (e.g. 0x1234), " +
-    "UUID (lowercase hex characters e.g. " +
-    "'00001234-0000-1000-8000-00805f9b34fb'), " +
-    "or recognized standard name from " +
-    "https://www.bluetooth.com/specifications/gatt/services" +
-    " e.g. 'alert_notification'.",
-    'TypeError');
-
-bluetooth_test(() => getConnectedHealthThermometerDevice()
-    .then(({device}) => assert_promise_rejects_with_message(
-        device.gatt.getPrimaryServices('wrong_name'),
-        expected,
-        'Wrong Service name passed.')),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-invalid-service-name.https.window.js
@@ -0,0 +1,25 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Wrong Service name. Reject with TypeError.';
+const expected = new DOMException(
+    'Failed to execute \'getPrimaryServices\' on ' +
+        '\'BluetoothRemoteGATTServer\': Invalid Service name: ' +
+        '\'wrong_name\'. It must be a valid UUID alias (e.g. 0x1234), ' +
+        'UUID (lowercase hex characters e.g. ' +
+        '\'00001234-0000-1000-8000-00805f9b34fb\'), ' +
+        'or recognized standard name from ' +
+        'https://www.bluetooth.com/specifications/gatt/services' +
+        ' e.g. \'alert_notification\'.',
+    'TypeError');
+
+bluetooth_test(
+    () => getConnectedHealthThermometerDevice().then(
+        ({device}) => assert_promise_rejects_with_message(
+            device.gatt.getPrimaryServices('wrong_name'), expected,
+            'Wrong Service name passed.')),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-absent-service-with-uuid.https.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Request for absent service without permission. ' +
-    'Reject with SecurityError.';
-const expected = new DOMException(
-    'Origin is not allowed to access the service. Tip: Add the service UUID ' +
-    'to \'optionalServices\' in requestDevice() options. ' +
-    'https://goo.gl/HxfxSQ',
-    'SecurityError');
-
-bluetooth_test(() => getConnectedHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}]
-    })
-    .then(({device}) => Promise.all([
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryServices(glucose.alias), expected),
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryServices(glucose.name), expected),
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryServices(glucose.uuid), expected)])),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-absent-service-with-uuid.https.window.js
@@ -0,0 +1,27 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Request for absent service without permission. ' +
+    'Reject with SecurityError.';
+const expected = new DOMException(
+    'Origin is not allowed to access the service. Tip: Add the service UUID ' +
+        'to \'optionalServices\' in requestDevice() options. ' +
+        'https://goo.gl/HxfxSQ',
+    'SecurityError');
+
+bluetooth_test(
+    () => getConnectedHealthThermometerDevice(
+              {filters: [{services: ['health_thermometer']}]})
+              .then(({device}) => Promise.all([
+                assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryServices(glucose.alias), expected),
+                assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryServices(glucose.name), expected),
+                assert_promise_rejects_with_message(
+                    device.gatt.getPrimaryServices(glucose.uuid), expected)
+              ])),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service-with-uuid.https.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Request for present service without permission to access ' +
-    'any service. Reject with SecurityError.';
-const expected = new DOMException(
-    'Origin is not allowed to access any service. Tip: Add the service ' +
-    'UUID to \'optionalServices\' in requestDevice() options. ' +
-    'https://goo.gl/HxfxSQ',
-     'SecurityError');
-
-bluetooth_test(() => getConnectedHealthThermometerDevice({acceptAllDevices: true})
-    .then(({device}) => assert_promise_rejects_with_message(
-        device.gatt.getPrimaryServices('heart_rate'),
-        expected)),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service-with-uuid.https.window.js
@@ -0,0 +1,21 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Request for present service without permission to access ' +
+    'any service. Reject with SecurityError.';
+const expected = new DOMException(
+    'Origin is not allowed to access any service. Tip: Add the service ' +
+        'UUID to \'optionalServices\' in requestDevice() options. ' +
+        'https://goo.gl/HxfxSQ',
+    'SecurityError');
+
+bluetooth_test(
+    () => getConnectedHealthThermometerDevice({acceptAllDevices: true})
+              .then(
+                  ({device}) => assert_promise_rejects_with_message(
+                      device.gatt.getPrimaryServices('heart_rate'), expected)),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service.https.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Request for present service without permission to access ' +
-    'any service. Reject with SecurityError.';
-const expected = new DOMException(
-    'Origin is not allowed to access any service. Tip: Add the service ' +
-    'UUID to \'optionalServices\' in requestDevice() options. ' +
-    'https://goo.gl/HxfxSQ',
-     'SecurityError');
-
-bluetooth_test(() => getConnectedHealthThermometerDevice({acceptAllDevices: true})
-    .then(({device}) => assert_promise_rejects_with_message(
-        device.gatt.getPrimaryServices(),
-        expected)),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-for-any-service.https.window.js
@@ -0,0 +1,21 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Request for present service without permission to access ' +
+    'any service. Reject with SecurityError.';
+const expected = new DOMException(
+    'Origin is not allowed to access any service. Tip: Add the service ' +
+        'UUID to \'optionalServices\' in requestDevice() options. ' +
+        'https://goo.gl/HxfxSQ',
+    'SecurityError');
+
+bluetooth_test(
+    () => getConnectedHealthThermometerDevice({acceptAllDevices: true})
+              .then(
+                  ({device}) => assert_promise_rejects_with_message(
+                      device.gatt.getPrimaryServices(), expected)),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-present-service-with-uuid.https.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Request for present service without permission. ' +
-    'Reject with SecurityError.';
-const expected = new DOMException(
-    'Origin is not allowed to access the service. Tip: Add the service UUID ' +
-    'to \'optionalServices\' in requestDevice() options. https://goo.gl/HxfxSQ',
-    'SecurityError');
-
-bluetooth_test(() => getConnectedHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}]
-    })
-    .then(({device}) => Promise.all([
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryServices(generic_access.alias), expected),
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryServices(generic_access.name), expected),
-      assert_promise_rejects_with_message(
-          device.gatt.getPrimaryServices(generic_access.uuid), expected)])),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-no-permission-present-service-with-uuid.https.window.js
@@ -0,0 +1,29 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Request for present service without permission. ' +
+    'Reject with SecurityError.';
+const expected = new DOMException(
+    'Origin is not allowed to access the service. Tip: Add the service UUID ' +
+        'to \'optionalServices\' in requestDevice() options. https://goo.gl/HxfxSQ',
+    'SecurityError');
+
+bluetooth_test(
+    () =>
+        getConnectedHealthThermometerDevice(
+            {filters: [{services: ['health_thermometer']}]})
+            .then(({device}) => Promise.all([
+              assert_promise_rejects_with_message(
+                  device.gatt.getPrimaryServices(generic_access.alias),
+                  expected),
+              assert_promise_rejects_with_message(
+                  device.gatt.getPrimaryServices(generic_access.name),
+                  expected),
+              assert_promise_rejects_with_message(
+                  device.gatt.getPrimaryServices(generic_access.uuid), expected)
+            ])),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-service-not-found-with-uuid.https.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Request for absent service. Reject with NotFoundError.';
-
-bluetooth_test(() => getHealthThermometerDevice({
-      filters: [{services: ['health_thermometer']}],
-      optionalServices: ['glucose']
-    })
-    .then(({device}) => assert_promise_rejects_with_message(
-        device.gatt.getPrimaryServices('glucose'),
-        new DOMException(
-            `No Services matching UUID ${glucose.uuid} found in Device.`,
-            'NotFoundError'))),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/server/getPrimaryServices/gen-service-not-found-with-uuid.https.window.js
@@ -0,0 +1,22 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Request for absent service. Reject with NotFoundError.';
+
+bluetooth_test(
+    () => getHealthThermometerDevice({
+            filters: [{services: ['health_thermometer']}],
+            optionalServices: ['glucose']
+          })
+              .then(
+                  ({device}) => assert_promise_rejects_with_message(
+                      device.gatt.getPrimaryServices('glucose'),
+                      new DOMException(
+                          `No Services matching UUID ${
+                              glucose.uuid} found in Device.`,
+                          'NotFoundError'))),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-blocklisted-characteristic.https.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Serial Number String characteristic is blocklisted. ' +
-    'Should reject with SecurityError.';
-const expected = new DOMException(
-    'getCharacteristic(s) called with blocklisted UUID. https://goo.gl/4NeimX',
-    'SecurityError');
-
-bluetooth_test(() => getHIDDevice({
-  filters: [{services: ['device_information']}]
-})
-    .then(({device}) => device.gatt.getPrimaryService('device_information'))
-    .then(service => assert_promise_rejects_with_message(
-        service.getCharacteristic('serial_number_string'),
-        expected,
-        'Serial Number String characteristic is blocklisted.')),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-blocklisted-characteristic.https.window.js
@@ -0,0 +1,24 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Serial Number String characteristic is blocklisted. ' +
+    'Should reject with SecurityError.';
+const expected = new DOMException(
+    'getCharacteristic(s) called with blocklisted UUID. https://goo.gl/4NeimX',
+    'SecurityError');
+
+bluetooth_test(
+    () =>
+        getHIDDevice({filters: [{services: ['device_information']}]})
+            .then(
+                ({device}) =>
+                    device.gatt.getPrimaryService('device_information'))
+            .then(
+                service => assert_promise_rejects_with_message(
+                    service.getCharacteristic('serial_number_string'), expected,
+                    'Serial Number String characteristic is blocklisted.')),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-characteristic-not-found.https.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Request for absent characteristics with UUID. ' +
-    'Reject with NotFoundError.';
-
-bluetooth_test(() => getEmptyHealthThermometerService()
-    .then(({service}) => assert_promise_rejects_with_message(
-        service.getCharacteristic('battery_level'),
-        new DOMException(
-            `No Characteristics matching UUID ${battery_level.uuid} found ` +
-            `in Service with UUID ${health_thermometer.uuid}.`,
-            'NotFoundError'))),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-characteristic-not-found.https.window.js
@@ -0,0 +1,20 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Request for absent characteristics with UUID. ' +
+    'Reject with NotFoundError.';
+
+bluetooth_test(
+    () => getEmptyHealthThermometerService().then(
+        ({service}) => assert_promise_rejects_with_message(
+            service.getCharacteristic('battery_level'),
+            new DOMException(
+                `No Characteristics matching UUID ${
+                    battery_level.uuid} found ` +
+                    `in Service with UUID ${health_thermometer.uuid}.`,
+                'NotFoundError'))),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-garbage-collection-ran-during-error.https.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Garbage Collection ran during getCharacteristic ' +
-    'call that fails. Should not crash';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve characteristics. ' +
-    '(Re)connect first with `device.gatt.connect`.',
-    'NetworkError');
-let promise;
-
-bluetooth_test(() => getHealthThermometerService()
-    .then(({service}) => {
-      promise = assert_promise_rejects_with_message(
-          service.getCharacteristic('measurement_interval'), expected);
-      // Disconnect called to clear attributeInstanceMap and allow the object to
-      // get garbage collected.
-      service.device.gatt.disconnect();
-    })
-    .then(runGarbageCollection)
-    .then(() => promise),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-garbage-collection-ran-during-error.https.window.js
@@ -0,0 +1,28 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Garbage Collection ran during getCharacteristic ' +
+    'call that fails. Should not crash';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve characteristics. ' +
+        '(Re)connect first with `device.gatt.connect`.',
+    'NetworkError');
+let promise;
+
+bluetooth_test(
+    () => getHealthThermometerService()
+              .then(({service}) => {
+                promise = assert_promise_rejects_with_message(
+                    service.getCharacteristic('measurement_interval'),
+                    expected);
+                // Disconnect called to clear attributeInstanceMap and allow the
+                // object to get garbage collected.
+                service.device.gatt.disconnect();
+              })
+              .then(runGarbageCollection)
+              .then(() => promise),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-get-same-object.https.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Calls to getCharacteristic should return the same object.';
-
-bluetooth_test(() => getHealthThermometerService()
-    .then(({service}) => Promise.all([
-      service.getCharacteristic('measurement_interval'),
-      service.getCharacteristic('measurement_interval')]))
-    .then(([characteristics_first_call, characteristics_second_call]) => {
-      // Convert to arrays if necessary.
-      characteristics_first_call = [].concat(characteristics_first_call);
-      characteristics_second_call = [].concat(characteristics_second_call);
-
-      let first_call_set = new Set(characteristics_first_call);
-      assert_equals(characteristics_first_call.length, first_call_set.size);
-      let second_call_set = new Set(characteristics_second_call);
-      assert_equals(characteristics_second_call.length, second_call_set.size);
-
-      characteristics_first_call.forEach(characteristic => {
-        assert_true(second_call_set.has(characteristic));
-      });
-    }), test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-get-same-object.https.window.js
@@ -0,0 +1,36 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Calls to getCharacteristic should return the same object.';
+
+bluetooth_test(
+    () =>
+        getHealthThermometerService()
+            .then(({service}) => Promise.all([
+              service.getCharacteristic('measurement_interval'),
+              service.getCharacteristic('measurement_interval')
+            ]))
+            .then(
+                ([characteristics_first_call, characteristics_second_call]) => {
+                  // Convert to arrays if necessary.
+                  characteristics_first_call =
+                      [].concat(characteristics_first_call);
+                  characteristics_second_call =
+                      [].concat(characteristics_second_call);
+
+                  let first_call_set = new Set(characteristics_first_call);
+                  assert_equals(
+                      characteristics_first_call.length, first_call_set.size);
+                  let second_call_set = new Set(characteristics_second_call);
+                  assert_equals(
+                      characteristics_second_call.length, second_call_set.size);
+
+                  characteristics_first_call.forEach(characteristic => {
+                    assert_true(second_call_set.has(characteristic));
+                  });
+                }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-invalid-characteristic-name.https.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Wrong Characteristic name. Reject with TypeError.';
-const expected = new DOMException(
-    "Failed to execute 'getCharacteristic' on " +
-    "'BluetoothRemoteGATTService': Invalid Characteristic name: " +
-    "'wrong_name'. " +
-    "It must be a valid UUID alias (e.g. 0x1234), " +
-    "UUID (lowercase hex characters e.g. " +
-    "'00001234-0000-1000-8000-00805f9b34fb'), " +
-    "or recognized standard name from " +
-    "https://www.bluetooth.com/specifications/gatt/characteristics" +
-    " e.g. 'aerobic_heart_rate_lower_limit'.",
-    'TypeError');
-
-bluetooth_test(() => getHealthThermometerService()
-    .then(({service}) => assert_promise_rejects_with_message(
-        service.getCharacteristic('wrong_name'),
-        expected,
-        'Wrong Characteristic name passed.')),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-invalid-characteristic-name.https.window.js
@@ -0,0 +1,26 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Wrong Characteristic name. Reject with TypeError.';
+const expected = new DOMException(
+    'Failed to execute \'getCharacteristic\' on ' +
+        '\'BluetoothRemoteGATTService\': Invalid Characteristic name: ' +
+        '\'wrong_name\'. ' +
+        'It must be a valid UUID alias (e.g. 0x1234), ' +
+        'UUID (lowercase hex characters e.g. ' +
+        '\'00001234-0000-1000-8000-00805f9b34fb\'), ' +
+        'or recognized standard name from ' +
+        'https://www.bluetooth.com/specifications/gatt/characteristics' +
+        ' e.g. \'aerobic_heart_rate_lower_limit\'.',
+    'TypeError');
+
+bluetooth_test(
+    () => getHealthThermometerService().then(
+        ({service}) => assert_promise_rejects_with_message(
+            service.getCharacteristic('wrong_name'), expected,
+            'Wrong Characteristic name passed.')),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-reconnect-during.https.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'disconnect() and connect() called during ' +
-    'getCharacteristic. Reject with NetworkError.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve characteristics. ' +
-    '(Re)connect first with `device.gatt.connect`.',
-    'NetworkError');
-let device;
-
-bluetooth_test(() => getHealthThermometerDeviceWithServicesDiscovered({
-  filters: [{services: [health_thermometer.name]}],
-})
-    .then(_ => ({device} = _))
-    .then(() => device.gatt.getPrimaryService(health_thermometer.name))
-    .then(service => Promise.all([
-      // 1. Make a call to service.getCharacteristic, while the service is still
-      // valid.
-      assert_promise_rejects_with_message(service.getCharacteristic(measurement_interval.name), expected),
-
-      // 2. disconnect() and connect before the initial call completes.
-      // This is accomplished by making the calls without waiting for the
-      // earlier promises to resolve.
-      // connect() guarantees on OS-level connection, but disconnect()
-      // only disconnects the current instance.
-      // getHealthThermometerDeviceWithServicesDiscovered holds another
-      // connection in an iframe, so disconnect() and connect() are certain to
-      // reconnect.  However, disconnect() will invalidate the service object so
-      // the subsequent calls made to it will fail, even after reconnecting.
-      device.gatt.disconnect(),
-      device.gatt.connect()
-    ])),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-reconnect-during.https.window.js
@@ -0,0 +1,42 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'disconnect() and connect() called during ' +
+    'getCharacteristic. Reject with NetworkError.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve characteristics. ' +
+        '(Re)connect first with `device.gatt.connect`.',
+    'NetworkError');
+let device;
+
+bluetooth_test(
+    () =>
+        getHealthThermometerDeviceWithServicesDiscovered({
+          filters: [{services: [health_thermometer.name]}],
+        })
+            .then(_ => ({device} = _))
+            .then(() => device.gatt.getPrimaryService(health_thermometer.name))
+            .then(service => Promise.all([
+              // 1. Make a call to service.getCharacteristic, while the service
+              // is still valid.
+              assert_promise_rejects_with_message(
+                  service.getCharacteristic(measurement_interval.name),
+                  expected),
+
+              // 2. disconnect() and connect before the initial call completes.
+              // This is accomplished by making the calls without waiting for
+              // the earlier promises to resolve. connect() guarantees on
+              // OS-level connection, but disconnect() only disconnects the
+              // current instance.
+              // getHealthThermometerDeviceWithServicesDiscovered holds another
+              // connection in an iframe, so disconnect() and connect() are
+              // certain to reconnect.  However, disconnect() will invalidate
+              // the service object so the subsequent calls made to it will
+              // fail, even after reconnecting.
+              device.gatt.disconnect(), device.gatt.connect()
+            ])),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-service-is-removed.https.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Service is removed before getCharacteristic call. ' +
-    'Reject with InvalidStateError.';
-const expected = new DOMException('GATT Service no longer exists.',
-    'InvalidStateError');
-let service, fake_service, fake_peripheral;
-
-bluetooth_test(() => getHealthThermometerService()
-    .then(_ => ({service, fake_service, fake_peripheral} = _))
-    .then(() => fake_service.remove())
-    .then(() => fake_peripheral.simulateGATTServicesChanged())
-    .then(() => assert_promise_rejects_with_message(
-        service.getCharacteristic('measurement_interval'),
-        expected,
-        'Service got removed.')),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristic/gen-service-is-removed.https.window.js
@@ -0,0 +1,23 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Service is removed before getCharacteristic call. ' +
+    'Reject with InvalidStateError.';
+const expected =
+    new DOMException('GATT Service no longer exists.', 'InvalidStateError');
+let service, fake_service, fake_peripheral;
+
+bluetooth_test(
+    () => getHealthThermometerService()
+              .then(_ => ({service, fake_service, fake_peripheral} = _))
+              .then(() => fake_service.remove())
+              .then(() => fake_peripheral.simulateGATTServicesChanged())
+              .then(
+                  () => assert_promise_rejects_with_message(
+                      service.getCharacteristic('measurement_interval'),
+                      expected, 'Service got removed.')),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-blocklisted-characteristic-with-uuid.https.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Serial Number String characteristic is blocklisted. ' +
-    'Should reject with SecurityError.';
-const expected = new DOMException(
-    'getCharacteristic(s) called with blocklisted UUID. https://goo.gl/4NeimX',
-    'SecurityError');
-
-bluetooth_test(() => getHIDDevice({
-  filters: [{services: ['device_information']}]
-})
-    .then(({device}) => device.gatt.getPrimaryService('device_information'))
-    .then(service => assert_promise_rejects_with_message(
-        service.getCharacteristics('serial_number_string'),
-        expected,
-        'Serial Number String characteristic is blocklisted.')),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-blocklisted-characteristic-with-uuid.https.window.js
@@ -0,0 +1,24 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Serial Number String characteristic is blocklisted. ' +
+    'Should reject with SecurityError.';
+const expected = new DOMException(
+    'getCharacteristic(s) called with blocklisted UUID. https://goo.gl/4NeimX',
+    'SecurityError');
+
+bluetooth_test(
+    () => getHIDDevice({filters: [{services: ['device_information']}]})
+              .then(
+                  ({device}) =>
+                      device.gatt.getPrimaryService('device_information'))
+              .then(
+                  service => assert_promise_rejects_with_message(
+                      service.getCharacteristics('serial_number_string'),
+                      expected,
+                      'Serial Number String characteristic is blocklisted.')),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-characteristic-not-found-with-uuid.https.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Request for absent characteristics with UUID. ' +
-    'Reject with NotFoundError.';
-
-bluetooth_test(() => getEmptyHealthThermometerService()
-    .then(({service}) => assert_promise_rejects_with_message(
-        service.getCharacteristics('battery_level'),
-        new DOMException(
-            `No Characteristics matching UUID ${battery_level.uuid} found ` +
-            `in Service with UUID ${health_thermometer.uuid}.`,
-            'NotFoundError'))),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-characteristic-not-found-with-uuid.https.window.js
@@ -0,0 +1,20 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Request for absent characteristics with UUID. ' +
+    'Reject with NotFoundError.';
+
+bluetooth_test(
+    () => getEmptyHealthThermometerService().then(
+        ({service}) => assert_promise_rejects_with_message(
+            service.getCharacteristics('battery_level'),
+            new DOMException(
+                `No Characteristics matching UUID ${
+                    battery_level.uuid} found ` +
+                    `in Service with UUID ${health_thermometer.uuid}.`,
+                'NotFoundError'))),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-garbage-collection-ran-during-error-with-uuid.https.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Garbage Collection ran during getCharacteristics ' +
-    'call that fails. Should not crash';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve characteristics. ' +
-    '(Re)connect first with `device.gatt.connect`.',
-    'NetworkError');
-let promise;
-
-bluetooth_test(() => getHealthThermometerService()
-    .then(({service}) => {
-      promise = assert_promise_rejects_with_message(
-          service.getCharacteristics('measurement_interval'), expected);
-      // Disconnect called to clear attributeInstanceMap and allow the object to
-      // get garbage collected.
-      service.device.gatt.disconnect();
-    })
-    .then(runGarbageCollection)
-    .then(() => promise),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-garbage-collection-ran-during-error-with-uuid.https.window.js
@@ -0,0 +1,28 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Garbage Collection ran during getCharacteristics ' +
+    'call that fails. Should not crash';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve characteristics. ' +
+        '(Re)connect first with `device.gatt.connect`.',
+    'NetworkError');
+let promise;
+
+bluetooth_test(
+    () => getHealthThermometerService()
+              .then(({service}) => {
+                promise = assert_promise_rejects_with_message(
+                    service.getCharacteristics('measurement_interval'),
+                    expected);
+                // Disconnect called to clear attributeInstanceMap and allow the
+                // object to get garbage collected.
+                service.device.gatt.disconnect();
+              })
+              .then(runGarbageCollection)
+              .then(() => promise),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-garbage-collection-ran-during-error.https.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Garbage Collection ran during getCharacteristics ' +
-    'call that fails. Should not crash';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve characteristics. ' +
-    '(Re)connect first with `device.gatt.connect`.',
-    'NetworkError');
-let promise;
-
-bluetooth_test(() => getHealthThermometerService()
-    .then(({service}) => {
-      promise = assert_promise_rejects_with_message(
-          service.getCharacteristics(), expected);
-      // Disconnect called to clear attributeInstanceMap and allow the object to
-      // get garbage collected.
-      service.device.gatt.disconnect();
-    })
-    .then(runGarbageCollection)
-    .then(() => promise),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-garbage-collection-ran-during-error.https.window.js
@@ -0,0 +1,27 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Garbage Collection ran during getCharacteristics ' +
+    'call that fails. Should not crash';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve characteristics. ' +
+        '(Re)connect first with `device.gatt.connect`.',
+    'NetworkError');
+let promise;
+
+bluetooth_test(
+    () => getHealthThermometerService()
+              .then(({service}) => {
+                promise = assert_promise_rejects_with_message(
+                    service.getCharacteristics(), expected);
+                // Disconnect called to clear attributeInstanceMap and allow the
+                // object to get garbage collected.
+                service.device.gatt.disconnect();
+              })
+              .then(runGarbageCollection)
+              .then(() => promise),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-get-same-object-with-uuid.https.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Calls to getCharacteristics should return the same object.';
-
-bluetooth_test(() => getHealthThermometerService()
-    .then(({service}) => Promise.all([
-      service.getCharacteristics('measurement_interval'),
-      service.getCharacteristics('measurement_interval')]))
-    .then(([characteristics_first_call, characteristics_second_call]) => {
-      // Convert to arrays if necessary.
-      characteristics_first_call = [].concat(characteristics_first_call);
-      characteristics_second_call = [].concat(characteristics_second_call);
-
-      let first_call_set = new Set(characteristics_first_call);
-      assert_equals(characteristics_first_call.length, first_call_set.size);
-      let second_call_set = new Set(characteristics_second_call);
-      assert_equals(characteristics_second_call.length, second_call_set.size);
-
-      characteristics_first_call.forEach(characteristic => {
-        assert_true(second_call_set.has(characteristic));
-      });
-    }), test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-get-same-object-with-uuid.https.window.js
@@ -0,0 +1,36 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Calls to getCharacteristics should return the same object.';
+
+bluetooth_test(
+    () =>
+        getHealthThermometerService()
+            .then(({service}) => Promise.all([
+              service.getCharacteristics('measurement_interval'),
+              service.getCharacteristics('measurement_interval')
+            ]))
+            .then(
+                ([characteristics_first_call, characteristics_second_call]) => {
+                  // Convert to arrays if necessary.
+                  characteristics_first_call =
+                      [].concat(characteristics_first_call);
+                  characteristics_second_call =
+                      [].concat(characteristics_second_call);
+
+                  let first_call_set = new Set(characteristics_first_call);
+                  assert_equals(
+                      characteristics_first_call.length, first_call_set.size);
+                  let second_call_set = new Set(characteristics_second_call);
+                  assert_equals(
+                      characteristics_second_call.length, second_call_set.size);
+
+                  characteristics_first_call.forEach(characteristic => {
+                    assert_true(second_call_set.has(characteristic));
+                  });
+                }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-get-same-object.https.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Calls to getCharacteristics should return the same object.';
-
-bluetooth_test(() => getHealthThermometerService()
-    .then(({service}) => Promise.all([
-      service.getCharacteristics(),
-      service.getCharacteristics()]))
-    .then(([characteristics_first_call, characteristics_second_call]) => {
-      // Convert to arrays if necessary.
-      characteristics_first_call = [].concat(characteristics_first_call);
-      characteristics_second_call = [].concat(characteristics_second_call);
-
-      let first_call_set = new Set(characteristics_first_call);
-      assert_equals(characteristics_first_call.length, first_call_set.size);
-      let second_call_set = new Set(characteristics_second_call);
-      assert_equals(characteristics_second_call.length, second_call_set.size);
-
-      characteristics_first_call.forEach(characteristic => {
-        assert_true(second_call_set.has(characteristic));
-      });
-    }), test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-get-same-object.https.window.js
@@ -0,0 +1,35 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Calls to getCharacteristics should return the same object.';
+
+bluetooth_test(
+    () =>
+        getHealthThermometerService()
+            .then(({service}) => Promise.all([
+              service.getCharacteristics(), service.getCharacteristics()
+            ]))
+            .then(
+                ([characteristics_first_call, characteristics_second_call]) => {
+                  // Convert to arrays if necessary.
+                  characteristics_first_call =
+                      [].concat(characteristics_first_call);
+                  characteristics_second_call =
+                      [].concat(characteristics_second_call);
+
+                  let first_call_set = new Set(characteristics_first_call);
+                  assert_equals(
+                      characteristics_first_call.length, first_call_set.size);
+                  let second_call_set = new Set(characteristics_second_call);
+                  assert_equals(
+                      characteristics_second_call.length, second_call_set.size);
+
+                  characteristics_first_call.forEach(characteristic => {
+                    assert_true(second_call_set.has(characteristic));
+                  });
+                }),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-invalid-characteristic-name.https.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Wrong Characteristic name. Reject with TypeError.';
-const expected = new DOMException(
-    "Failed to execute 'getCharacteristics' on " +
-    "'BluetoothRemoteGATTService': Invalid Characteristic name: " +
-    "'wrong_name'. " +
-    "It must be a valid UUID alias (e.g. 0x1234), " +
-    "UUID (lowercase hex characters e.g. " +
-    "'00001234-0000-1000-8000-00805f9b34fb'), " +
-    "or recognized standard name from " +
-    "https://www.bluetooth.com/specifications/gatt/characteristics" +
-    " e.g. 'aerobic_heart_rate_lower_limit'.",
-    'TypeError');
-
-bluetooth_test(() => getHealthThermometerService()
-    .then(({service}) => assert_promise_rejects_with_message(
-        service.getCharacteristics('wrong_name'),
-        expected,
-        'Wrong Characteristic name passed.')),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-invalid-characteristic-name.https.window.js
@@ -0,0 +1,26 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Wrong Characteristic name. Reject with TypeError.';
+const expected = new DOMException(
+    'Failed to execute \'getCharacteristics\' on ' +
+        '\'BluetoothRemoteGATTService\': Invalid Characteristic name: ' +
+        '\'wrong_name\'. ' +
+        'It must be a valid UUID alias (e.g. 0x1234), ' +
+        'UUID (lowercase hex characters e.g. ' +
+        '\'00001234-0000-1000-8000-00805f9b34fb\'), ' +
+        'or recognized standard name from ' +
+        'https://www.bluetooth.com/specifications/gatt/characteristics' +
+        ' e.g. \'aerobic_heart_rate_lower_limit\'.',
+    'TypeError');
+
+bluetooth_test(
+    () => getHealthThermometerService().then(
+        ({service}) => assert_promise_rejects_with_message(
+            service.getCharacteristics('wrong_name'), expected,
+            'Wrong Characteristic name passed.')),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-reconnect-during-with-uuid.https.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'disconnect() and connect() called during ' +
-    'getCharacteristics. Reject with NetworkError.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve characteristics. ' +
-    '(Re)connect first with `device.gatt.connect`.',
-    'NetworkError');
-let device;
-
-bluetooth_test(() => getHealthThermometerDeviceWithServicesDiscovered({
-  filters: [{services: [health_thermometer.name]}],
-})
-    .then(_ => ({device} = _))
-    .then(() => device.gatt.getPrimaryService(health_thermometer.name))
-    .then(service => Promise.all([
-      // 1. Make a call to service.getCharacteristics, while the service is still
-      // valid.
-      assert_promise_rejects_with_message(service.getCharacteristics(measurement_interval.name), expected),
-
-      // 2. disconnect() and connect before the initial call completes.
-      // This is accomplished by making the calls without waiting for the
-      // earlier promises to resolve.
-      // connect() guarantees on OS-level connection, but disconnect()
-      // only disconnects the current instance.
-      // getHealthThermometerDeviceWithServicesDiscovered holds another
-      // connection in an iframe, so disconnect() and connect() are certain to
-      // reconnect.  However, disconnect() will invalidate the service object so
-      // the subsequent calls made to it will fail, even after reconnecting.
-      device.gatt.disconnect(),
-      device.gatt.connect()
-    ])),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-reconnect-during-with-uuid.https.window.js
@@ -0,0 +1,42 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'disconnect() and connect() called during ' +
+    'getCharacteristics. Reject with NetworkError.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve characteristics. ' +
+        '(Re)connect first with `device.gatt.connect`.',
+    'NetworkError');
+let device;
+
+bluetooth_test(
+    () =>
+        getHealthThermometerDeviceWithServicesDiscovered({
+          filters: [{services: [health_thermometer.name]}],
+        })
+            .then(_ => ({device} = _))
+            .then(() => device.gatt.getPrimaryService(health_thermometer.name))
+            .then(service => Promise.all([
+              // 1. Make a call to service.getCharacteristics, while the service
+              // is still valid.
+              assert_promise_rejects_with_message(
+                  service.getCharacteristics(measurement_interval.name),
+                  expected),
+
+              // 2. disconnect() and connect before the initial call completes.
+              // This is accomplished by making the calls without waiting for
+              // the earlier promises to resolve. connect() guarantees on
+              // OS-level connection, but disconnect() only disconnects the
+              // current instance.
+              // getHealthThermometerDeviceWithServicesDiscovered holds another
+              // connection in an iframe, so disconnect() and connect() are
+              // certain to reconnect.  However, disconnect() will invalidate
+              // the service object so the subsequent calls made to it will
+              // fail, even after reconnecting.
+              device.gatt.disconnect(), device.gatt.connect()
+            ])),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-reconnect-during.https.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'disconnect() and connect() called during ' +
-    'getCharacteristics. Reject with NetworkError.';
-const expected = new DOMException(
-    'GATT Server is disconnected. Cannot retrieve characteristics. ' +
-    '(Re)connect first with `device.gatt.connect`.',
-    'NetworkError');
-let device;
-
-bluetooth_test(() => getHealthThermometerDeviceWithServicesDiscovered({
-  filters: [{services: [health_thermometer.name]}],
-})
-    .then(_ => ({device} = _))
-    .then(() => device.gatt.getPrimaryService(health_thermometer.name))
-    .then(service => Promise.all([
-      // 1. Make a call to service.getCharacteristics, while the service is still
-      // valid.
-      assert_promise_rejects_with_message(service.getCharacteristics(), expected),
-
-      // 2. disconnect() and connect before the initial call completes.
-      // This is accomplished by making the calls without waiting for the
-      // earlier promises to resolve.
-      // connect() guarantees on OS-level connection, but disconnect()
-      // only disconnects the current instance.
-      // getHealthThermometerDeviceWithServicesDiscovered holds another
-      // connection in an iframe, so disconnect() and connect() are certain to
-      // reconnect.  However, disconnect() will invalidate the service object so
-      // the subsequent calls made to it will fail, even after reconnecting.
-      device.gatt.disconnect(),
-      device.gatt.connect()
-    ])),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-reconnect-during.https.window.js
@@ -0,0 +1,41 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'disconnect() and connect() called during ' +
+    'getCharacteristics. Reject with NetworkError.';
+const expected = new DOMException(
+    'GATT Server is disconnected. Cannot retrieve characteristics. ' +
+        '(Re)connect first with `device.gatt.connect`.',
+    'NetworkError');
+let device;
+
+bluetooth_test(
+    () =>
+        getHealthThermometerDeviceWithServicesDiscovered({
+          filters: [{services: [health_thermometer.name]}],
+        })
+            .then(_ => ({device} = _))
+            .then(() => device.gatt.getPrimaryService(health_thermometer.name))
+            .then(service => Promise.all([
+              // 1. Make a call to service.getCharacteristics, while the service
+              // is still valid.
+              assert_promise_rejects_with_message(
+                  service.getCharacteristics(), expected),
+
+              // 2. disconnect() and connect before the initial call completes.
+              // This is accomplished by making the calls without waiting for
+              // the earlier promises to resolve. connect() guarantees on
+              // OS-level connection, but disconnect() only disconnects the
+              // current instance.
+              // getHealthThermometerDeviceWithServicesDiscovered holds another
+              // connection in an iframe, so disconnect() and connect() are
+              // certain to reconnect.  However, disconnect() will invalidate
+              // the service object so the subsequent calls made to it will
+              // fail, even after reconnecting.
+              device.gatt.disconnect(), device.gatt.connect()
+            ])),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-service-is-removed-with-uuid.https.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Service is removed before getCharacteristics call. ' +
-    'Reject with InvalidStateError.';
-const expected = new DOMException('GATT Service no longer exists.',
-    'InvalidStateError');
-let service, fake_service, fake_peripheral;
-
-bluetooth_test(() => getHealthThermometerService()
-    .then(_ => ({service, fake_service, fake_peripheral} = _))
-    .then(() => fake_service.remove())
-    .then(() => fake_peripheral.simulateGATTServicesChanged())
-    .then(() => assert_promise_rejects_with_message(
-        service.getCharacteristics('measurement_interval'),
-        expected,
-        'Service got removed.')),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-service-is-removed-with-uuid.https.window.js
@@ -0,0 +1,23 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Service is removed before getCharacteristics call. ' +
+    'Reject with InvalidStateError.';
+const expected =
+    new DOMException('GATT Service no longer exists.', 'InvalidStateError');
+let service, fake_service, fake_peripheral;
+
+bluetooth_test(
+    () => getHealthThermometerService()
+              .then(_ => ({service, fake_service, fake_peripheral} = _))
+              .then(() => fake_service.remove())
+              .then(() => fake_peripheral.simulateGATTServicesChanged())
+              .then(
+                  () => assert_promise_rejects_with_message(
+                      service.getCharacteristics('measurement_interval'),
+                      expected, 'Service got removed.')),
+    test_desc);
deleted file mode 100644
--- a/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-service-is-removed.https.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
-<script>
-'use strict';
-const test_desc = 'Service is removed before getCharacteristics call. ' +
-    'Reject with InvalidStateError.';
-const expected = new DOMException('GATT Service no longer exists.',
-    'InvalidStateError');
-let service, fake_service, fake_peripheral;
-
-bluetooth_test(() => getHealthThermometerService()
-    .then(_ => ({service, fake_service, fake_peripheral} = _))
-    .then(() => fake_service.remove())
-    .then(() => fake_peripheral.simulateGATTServicesChanged())
-    .then(() => assert_promise_rejects_with_message(
-        service.getCharacteristics(),
-        expected,
-        'Service got removed.')),
-    test_desc);
-
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/bluetooth/service/getCharacteristics/gen-service-is-removed.https.window.js
@@ -0,0 +1,23 @@
+// META: script=/resources/testharness.js
+// META: script=/resources/testharnessreport.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=/bluetooth/resources/bluetooth-helpers.js
+// Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py
+'use strict';
+const test_desc = 'Service is removed before getCharacteristics call. ' +
+    'Reject with InvalidStateError.';
+const expected =
+    new DOMException('GATT Service no longer exists.', 'InvalidStateError');
+let service, fake_service, fake_peripheral;
+
+bluetooth_test(
+    () => getHealthThermometerService()
+              .then(_ => ({service, fake_service, fake_peripheral} = _))
+              .then(() => fake_service.remove())
+              .then(() => fake_peripheral.simulateGATTServicesChanged())
+              .then(
+                  () => assert_promise_rejects_with_message(
+                      service.getCharacteristics(), expected,
+                      'Service got removed.')),
+    test_desc);