mirror of
https://github.com/servo/servo.git
synced 2025-08-17 11:25:35 +01:00
Update web-platform-tests to revision cf261625e2d230ab219eec966f4abe26e3401b64
This commit is contained in:
parent
11a89bcc47
commit
8f98acd0e7
297 changed files with 3396 additions and 1555 deletions
|
@ -1,2 +1,2 @@
|
|||
import('./static-import-worker.js')
|
||||
.then(module => postMessage('LOADED'));
|
||||
import('./export-on-static-import-script.js')
|
||||
.then(module => postMessage(module.importedModules));
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// Dynamically import the script URL sent by postMessage().
|
||||
self.addEventListener('message', e => {
|
||||
import(e.data).catch(error_event => postMessage('ERROR'));
|
||||
// This worker dynamically imports the script URL sent by postMessage(), and
|
||||
// sends back an error name if the dynamic import fails.
|
||||
self.addEventListener('message', msg_event => {
|
||||
import(msg_event.data).catch(e => postMessage(e.name));
|
||||
});
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
import('./post-message-on-load-worker.js')
|
||||
.then(module => postMessage('LOADED'));
|
||||
import('./export-on-load-script.js')
|
||||
.then(module => postMessage(module.importedModules));
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
const code = "import('./export-on-load-script.js')" +
|
||||
" .then(module => postMessage(module.importedModules));"
|
||||
eval(code);
|
|
@ -0,0 +1,7 @@
|
|||
// Export the list of imported modules. It's available after the |ready| promise
|
||||
// is resolved.
|
||||
export let importedModules = ['export-on-dynamic-import-script.js'];
|
||||
export let ready = import('./export-on-load-script.js')
|
||||
.then(module => {
|
||||
Array.prototype.push.apply(importedModules, module.importedModules);
|
||||
});
|
|
@ -0,0 +1 @@
|
|||
export const importedModules = ['export-on-load-script.js'];
|
|
@ -0,0 +1,3 @@
|
|||
import * as module from './export-on-load-script.js';
|
||||
const filename = 'export-on-static-import-script.js';
|
||||
export const importedModules = [filename].concat(module.importedModules);
|
|
@ -2,5 +2,14 @@ try {
|
|||
importScripts('empty-worker.js');
|
||||
postMessage('LOADED');
|
||||
} catch (e) {
|
||||
// Post a message instead of propagating an ErrorEvent to the page because
|
||||
// propagated event loses an error name.
|
||||
//
|
||||
// Step 1. "Let notHandled be the result of firing an event named error at the
|
||||
// Worker object associated with the worker, using ErrorEvent, with the
|
||||
// cancelable attribute initialized to true, the message, filename, lineno,
|
||||
// and colno attributes initialized appropriately, and the error attribute
|
||||
// initialized to null."
|
||||
// https://html.spec.whatwg.org/multipage/workers.html#runtime-script-errors-2
|
||||
postMessage(e.name);
|
||||
}
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
import('./dynamic-import-worker.js')
|
||||
.then(module => postMessage('LOADED'));
|
||||
import('./export-on-dynamic-import-script.js')
|
||||
.then(async module => {
|
||||
await module.ready;
|
||||
postMessage(module.importedModules);
|
||||
});
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
import './static-import-worker.js';
|
||||
postMessage('LOADED')
|
||||
import * as module from './export-on-static-import-script.js';
|
||||
postMessage(module.importedModules);
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
import './dynamic-import-worker.js';
|
||||
postMessage('LOADED');
|
||||
import * as module from './export-on-dynamic-import-script.js';
|
||||
module.ready.then(() => postMessage(module.importedModules));
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
import './post-message-on-load-worker.js';
|
||||
postMessage('LOADED');
|
||||
import * as module from './export-on-load-script.js';
|
||||
postMessage(module.importedModules);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue