mirror of
https://github.com/servo/servo.git
synced 2025-06-27 02:23:41 +01:00
Update web-platform-tests to revision 4a5223502fa660ce03e470af6a61c8bc26c5a8ee
This commit is contained in:
parent
c5f7c9ccf3
commit
e891345f26
1328 changed files with 36632 additions and 20588 deletions
|
@ -4,8 +4,8 @@
|
|||
<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me">
|
||||
<meta http-equiv="Content-Security-Policy" content="require-sri-for script">
|
||||
|
||||
<script src="/resources/testharness.js" integrity="sha384-4Nybydhnr3tOpv1yrTkDxu3RFpnxWAxlU5kGn7c8ebKvh1iUdfVMjqP6jf0dacrV"></script>
|
||||
<script src="/resources/testharnessreport.js" integrity="sha384-GOnHxuyo+nnsFAe4enY+RAl4/+w5NPMJPCQiDroTjxtR7ndRz7Uan8vNbM2qWKmU"></script>
|
||||
<script src="/resources/testharness.js" integrity="sha384-{{file_hash(sha384, resources/testharness.js)}}"></script>
|
||||
<script src="/resources/testharnessreport.js" integrity="sha384-{{file_hash(sha384, resources/testharnessreport.js)}}"></script>
|
||||
|
||||
<div id="dummy"></div>
|
||||
|
|
@ -4,8 +4,8 @@
|
|||
<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me">
|
||||
<meta http-equiv="Content-Security-Policy" content="require-sri-for script">
|
||||
|
||||
<script src="/resources/testharness.js" integrity="sha384-4Nybydhnr3tOpv1yrTkDxu3RFpnxWAxlU5kGn7c8ebKvh1iUdfVMjqP6jf0dacrV"></script>
|
||||
<script src="/resources/testharnessreport.js" integrity="sha384-GOnHxuyo+nnsFAe4enY+RAl4/+w5NPMJPCQiDroTjxtR7ndRz7Uan8vNbM2qWKmU"></script>
|
||||
<script src="/resources/testharness.js" integrity="sha384-{{file_hash(sha384, resources/testharness.js)}}"></script>
|
||||
<script src="/resources/testharnessreport.js" integrity="sha384-{{file_hash(sha384, resources/testharnessreport.js)}}"></script>
|
||||
|
||||
<div id="dummy"></div>
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>import() inside compiled strings inside a classic script</title>
|
||||
<link rel="help" href="https://github.com/whatwg/html/pull/3163">
|
||||
<link rel="help" href="https://github.com/tc39/ecma262/issues/871#issuecomment-292493142">
|
||||
<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
self.ran = false;
|
||||
|
||||
promise_test(t => {
|
||||
t.add_cleanup(() => {
|
||||
self.ran = false;
|
||||
})
|
||||
|
||||
return Promise.resolve(`import("../imports-a.js?1").then(() => { self.ran = true; })`)
|
||||
.then(eval)
|
||||
.then(() => {
|
||||
assert_true(self.ran);
|
||||
});
|
||||
}, "Evaled the script via eval, successful import");
|
||||
|
||||
promise_test(t => {
|
||||
t.add_cleanup(() => {
|
||||
self.ran = false;
|
||||
})
|
||||
|
||||
return Promise.resolve(`import("bad-specifier?1").catch(() => { self.ran = true; })`)
|
||||
.then(eval)
|
||||
.then(() => {
|
||||
assert_true(self.ran);
|
||||
});
|
||||
}, "Evaled the script via eval, failed import");
|
||||
|
||||
promise_test(t => {
|
||||
t.add_cleanup(() => {
|
||||
self.ran = false;
|
||||
})
|
||||
|
||||
return Promise.resolve(`return import("../imports-a.js?2").then(() => { self.ran = true; })`)
|
||||
.then(Function)
|
||||
.then(Function.prototype.call.bind(Function.prototype.call))
|
||||
.then(() => {
|
||||
assert_true(self.ran);
|
||||
});
|
||||
}, "Evaled the script via Function, successful import");
|
||||
|
||||
promise_test(t => {
|
||||
t.add_cleanup(() => {
|
||||
self.ran = false;
|
||||
})
|
||||
|
||||
return Promise.resolve(`return import("bad-specifier?2").catch(() => { self.ran = true; })`)
|
||||
.then(Function)
|
||||
.then(Function.prototype.call.bind(Function.prototype.call))
|
||||
.then(() => {
|
||||
assert_true(self.ran);
|
||||
});
|
||||
}, "Evaled the script via Function, failed import");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue