mirror of
https://github.com/servo/servo.git
synced 2025-10-17 16:59:27 +01:00
Update web-platform-tests to revision cf8a15a334c6eb3b044b3db8a933436c2365819d
This commit is contained in:
parent
7d66871a9f
commit
f4e67a0197
76 changed files with 1744 additions and 114 deletions
|
@ -216,3 +216,35 @@ function runTest(name)
|
|||
|
||||
runTestFunction();
|
||||
}
|
||||
|
||||
// Simpler than audit.js, but still logs the message. Requires
|
||||
// `setup("explicit_done": true)` if testing code that runs after the "load"
|
||||
// event.
|
||||
function equals(a, b, msg) {
|
||||
test(function() {
|
||||
assert_equals(a, b);
|
||||
}, msg);
|
||||
}
|
||||
function is_true(a, msg) {
|
||||
test(function() {
|
||||
assert_true(a);
|
||||
}, msg);
|
||||
}
|
||||
|
||||
// This allows writing AudioWorkletProcessor code in the same file as the rest
|
||||
// of the test, for quick one off AudioWorkletProcessor testing.
|
||||
function URLFromScriptsElements(ids)
|
||||
{
|
||||
var scriptTexts = [];
|
||||
for (let id of ids) {
|
||||
|
||||
const e = document.querySelector("script#"+id)
|
||||
if (!e) {
|
||||
throw id+" is not the id of a <script> tag";
|
||||
}
|
||||
scriptTexts.push(e.innerText);
|
||||
}
|
||||
const blob = new Blob(scriptTexts, {type: "application/javascript"});
|
||||
|
||||
return URL.createObjectURL(blob);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue