mirror of
https://github.com/servo/servo.git
synced 2025-08-08 15:05:35 +01:00
Update web-platform-tests to revision a589fd30bc64bb4d40e1d6854e07accca69b8472
This commit is contained in:
parent
81ab255b70
commit
fd4e600639
57 changed files with 1735 additions and 208 deletions
34
tests/wpt/web-platform-tests/workers/examples/general.any.js
Normal file
34
tests/wpt/web-platform-tests/workers/examples/general.any.js
Normal file
|
@ -0,0 +1,34 @@
|
|||
// META: global=!default,worker
|
||||
|
||||
// See
|
||||
// https://web-platform-tests.org/writing-tests/testharness.html#multi-global-tests
|
||||
// for how to specify in which global scopes to run this tests,
|
||||
// how to specify additional scripts needed, etc.
|
||||
|
||||
// testharness.js is imported (via importScripts()) by generated glue code by
|
||||
// WPT server.
|
||||
// See AnyWorkerHandler in
|
||||
// https://github.com/web-platform-tests/wpt/blob/master/tools/serve/serve.py.
|
||||
|
||||
// ============================================================================
|
||||
|
||||
// Test body.
|
||||
// .any.js tests are always testharness.js-based.
|
||||
test(() => {
|
||||
assert_equals(1, 1, "1 == 1");
|
||||
},
|
||||
"Test that should pass"
|
||||
);
|
||||
|
||||
test(() => {
|
||||
// This file is "general.any.js" but the worker top-level script is
|
||||
// "general.any.worker.js", which is generated by the WPT server.
|
||||
assert_equals(location.pathname, "/workers/examples/general.any.worker.js");
|
||||
},
|
||||
"Worker top-level script is a generated script."
|
||||
);
|
||||
|
||||
// done() is NOT needed in .any.js tests, as it is called by generated
|
||||
// glue code by the WPT server.
|
||||
// See AnyWorkerHandler in
|
||||
// https://github.com/web-platform-tests/wpt/blob/master/tools/serve/serve.py.
|
Loading…
Add table
Add a link
Reference in a new issue