summaryrefslogtreecommitdiff
path: root/tools/wpt/testharnessreport.js
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-03-05 11:41:16 +1100
committerGitHub <noreply@github.com>2024-03-05 00:41:16 +0000
commit0022c35a237773b50a771b0fef48cac734f7a9d6 (patch)
treea7a2f9472d432c6ae9b329e6a62a9dbe0f69de75 /tools/wpt/testharnessreport.js
parentc559e813e172bc67225391d3c5cb5d85c14c6279 (diff)
chore: move `tools/wpt` to `tests/wpt/runner` (#22545)
Towards #22525 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: Matt Mastracci <matthew@mastracci.com>
Diffstat (limited to 'tools/wpt/testharnessreport.js')
-rw-r--r--tools/wpt/testharnessreport.js29
1 files changed, 0 insertions, 29 deletions
diff --git a/tools/wpt/testharnessreport.js b/tools/wpt/testharnessreport.js
deleted file mode 100644
index 7cc6a9e2d..000000000
--- a/tools/wpt/testharnessreport.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-
-window.add_result_callback(({ message, name, stack, status }) => {
- const data = new TextEncoder().encode(
- `${JSON.stringify({ name, status, message, stack })}\n`,
- );
- let bytesWritten = 0;
- while (bytesWritten < data.byteLength) {
- bytesWritten += Deno.stderr.writeSync(data.subarray(bytesWritten));
- }
-});
-
-window.add_completion_callback((_tests, harnessStatus) => {
- const data = new TextEncoder().encode(
- `#$#$#${JSON.stringify(harnessStatus)}\n`,
- );
- let bytesWritten = 0;
- while (bytesWritten < data.byteLength) {
- bytesWritten += Deno.stderr.writeSync(data.subarray(bytesWritten));
- }
-
- // TODO(cjihrig): Restore the prototype of globalThis to be an EventTarget
- // again. There are WPTs that change the prototype, which causes brand
- // checking to fail. Once the globalThis prototype is frozen properly, this
- // line can be removed.
- Object.setPrototypeOf(globalThis, EventTarget.prototype);
-
- Deno.exit(harnessStatus.status === 0 ? 0 : 1);
-});