Update web-platform-tests to revision 2b7dace05fc1869398ee24f84fda4c0e4c0455ae

This commit is contained in:
WPT Sync Bot 2018-08-31 21:37:12 +00:00 committed by Tom Servo
parent b23125d590
commit 6c901de216
844 changed files with 19802 additions and 3093 deletions

View file

@ -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