mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision 919ca26d28f02c636d4fa3d4e910a6038f02d993
This commit is contained in:
parent
f7d3d4a447
commit
136aa4015b
154 changed files with 1878 additions and 608 deletions
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Image load parses URL after microtask runs</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<img id="img">
|
||||
<script>
|
||||
const t = async_test("An image request's parsed URL should be affected by a " +
|
||||
"dynamically-inserted <base>, if it was inserted before " +
|
||||
"the image request microtask runs");
|
||||
|
||||
t.step(() => {
|
||||
const elm = document.getElementById('img');
|
||||
elm.src = 'resources/image.png';
|
||||
elm.onload = t.unreached_func("The image should have failed to load, as " +
|
||||
"the request URL should be affected by the " +
|
||||
"<base> element");
|
||||
elm.onerror = t.step_func_done();
|
||||
|
||||
const base = document.createElement("base");
|
||||
base.setAttribute("href", "bogus/");
|
||||
document.head.appendChild(base);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -31,6 +31,7 @@
|
|||
<img crossorigin=use-credentials data-desc="crossorigin use-credentials to absent, src absent">
|
||||
<img crossorigin=use-credentials data-desc="crossorigin use-credentials to empty, src absent">
|
||||
<img crossorigin=use-credentials data-desc="crossorigin use-credentials to anonymous, src absent">
|
||||
<img crossorigin=use-credentials data-desc="crossorigin use-credentials to invalid, src absent">
|
||||
|
||||
<img src="/images/green-2x2.png" data-desc="crossorigin absent to empty, src already set">
|
||||
<img src="/images/green-2x2.png" data-desc="crossorigin absent to anonymous, src already set">
|
||||
|
@ -42,6 +43,7 @@
|
|||
<img src="/images/green-2x2.png" crossorigin=use-credentials data-desc="crossorigin use-credentials to absent, src already set">
|
||||
<img src="/images/green-2x2.png" crossorigin=use-credentials data-desc="crossorigin use-credentials to empty, src already set">
|
||||
<img src="/images/green-2x2.png" crossorigin=use-credentials data-desc="crossorigin use-credentials to anonymous, src already set">
|
||||
<img src="/images/green-2x2.png" crossorigin=use-credentials data-desc="crossorigin use-credentials to invalid, src already set">
|
||||
|
||||
<img src="/images/green-2x2.png" data-desc="inserted into picture"><picture></picture>
|
||||
|
||||
|
@ -220,6 +222,10 @@ onload = function() {
|
|||
img.crossOrigin = 'anonymous';
|
||||
}, 'timeout');
|
||||
|
||||
t('crossorigin use-credentials to invalid, src absent', function(img) {
|
||||
img.crossOrigin = 'foobar';
|
||||
}, 'timeout');
|
||||
|
||||
// When src is set, changing the crossorigin attribute state MUST generate
|
||||
// events.
|
||||
|
||||
|
@ -263,6 +269,10 @@ onload = function() {
|
|||
img.crossOrigin = 'anonymous';
|
||||
}, 'load');
|
||||
|
||||
t('crossorigin use-credentials to invalid, src already set', function(img) {
|
||||
img.crossOrigin = 'foobar';
|
||||
}, 'load');
|
||||
|
||||
t('inserted into picture', function(img) {
|
||||
img.nextSibling.appendChild(img);
|
||||
}, 'load');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue