-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it trivial to have a test run in window and worker scopes #2558
Comments
Streams and unhandled promise rejections (#2388) really wants this too. We are using the following pattern: <!DOCTYPE html>
<meta charset="utf-8">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/service-workers/service-workers/resources/test-helpers.js"></script>
<link rel="help" href="https://html.spec.whatwg.org/#unhandled-promise-rejections">
<script src="support/test-helper-1.js"></script>
<script src="support/test-helper-2.js"></script>
<script src="support/promise-rejection-events.js"></script>
<script>
fetch_tests_from_worker(new Worker('support/promise-rejection-events.js'));
fetch_tests_from_worker(new SharedWorker('support/promise-rejection-events.js'));
service_worker_test('support/promise-rejection-events.js');
</script> // support/promise-rejection-events.js
'use strict';
if (self.importScripts) {
importScripts('/resources/testharness.js');
importScripts('/resources/test-helper-1.js');
importScripts('/resources/test-helper-2.js');
}
// Tests go here...
done(); |
bz suggested testname.chameleon.js, testname.allscopes.js, testname.allglobals.js, testname.everywhere.js, testname.testmeharder.js. |
Ms2ger
added a commit
to w3c/wpt-tools
that referenced
this issue
Jul 23, 2016
jgraham
pushed a commit
to w3c/wpt-tools
that referenced
this issue
Jul 26, 2016
* Implement support for multi-global tests. CC <web-platform-tests/wpt#2558>. * Make the .any.js and .worker.js handlers more robust against unexpected file names.
@Ms2ger w3c/wpt-tools#88 fixed this right in the form of |
Yep, thanks |
Note, however, #4210 is still open. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now, the most straightforward way requires three files:
Since the latter two files are entirely boilerplate, we should be able to do it with just one file.
The text was updated successfully, but these errors were encountered: