mirror of
https://github.com/servo/servo.git
synced 2025-09-07 05:28:21 +01:00
Update web-platform-tests to revision 2b7dace05fc1869398ee24f84fda4c0e4c0455ae
This commit is contained in:
parent
b23125d590
commit
6c901de216
844 changed files with 19802 additions and 3093 deletions
|
@ -8,6 +8,29 @@
|
|||
// these tests the browser must be run with these options:
|
||||
//
|
||||
// --enable-blink-features=MojoJS,MojoJSTest
|
||||
|
||||
(() => {
|
||||
// Load scripts needed by the test API on context creation.
|
||||
if ('MojoInterfaceInterceptor' in self) {
|
||||
let prefix = '/resources/chromium';
|
||||
if ('window' in self) {
|
||||
if (window.location.pathname.includes('/LayoutTests/')) {
|
||||
let root = window.location.pathname.match(/.*LayoutTests/);
|
||||
prefix = `${root}/external/wpt/resources/chromium`;
|
||||
}
|
||||
}
|
||||
let scriptPath = `${prefix}/webusb-child-test.js`;
|
||||
if (typeof document == 'undefined') {
|
||||
importScripts(scriptPath);
|
||||
} else {
|
||||
let script = document.createElement('script');
|
||||
script.src = scriptPath;
|
||||
script.async = false;
|
||||
document.head.appendChild(script);
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
let loadChromiumResources = Promise.resolve().then(() => {
|
||||
if (!('MojoInterfaceInterceptor' in self)) {
|
||||
// Do nothing on non-Chromium-based browsers or when the Mojo bindings are
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue