Commit cf5d2970 authored by Hiroshige Hayashizaki's avatar Hiroshige Hayashizaki Committed by Commit Bot

[WPT] Use `self` to access global object in testharness

This is to run testharness.js as module scripts (e.g. via `import`).

For the same purpose, this CL also fixes undeclared variable
in Chromium's testharnessreport.js.

Bug: https://github.com/web-platform-tests/wpt/issues/12480
Change-Id: I1ff539676b754e27c9f5d50a355f5ca2fb9c07b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2341230Reviewed-by: default avatarStephen McGruer <smcgruer@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796696}
parent 5ca8a31b
...@@ -3998,5 +3998,5 @@ span.ok, span.timeout, span.error {\ ...@@ -3998,5 +3998,5 @@ span.ok, span.timeout, span.error {\
}\ }\
"; ";
})(this); })(self);
// vim: set expandtab shiftwidth=4 tabstop=4: // vim: set expandtab shiftwidth=4 tabstop=4:
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
} }
// Output failure metrics if there are many. // Output failure metrics if there are many.
resultCounts = countResultTypes(tests); const resultCounts = countResultTypes(tests);
if (outputDocument.URL.indexOf('://web-platform.test') >= 0 && if (outputDocument.URL.indexOf('://web-platform.test') >= 0 &&
tests.length >= 50 && tests.length >= 50 &&
(resultCounts[1] || resultCounts[2] || resultCounts[3])) { (resultCounts[1] || resultCounts[2] || resultCounts[3])) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment