mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision fec3928f355e049657d19780aa4b412d9d3a714b
This commit is contained in:
parent
74ba683e27
commit
2a8d9b6983
153 changed files with 3075 additions and 719 deletions
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>SVGImageElement.prototype.decode(), attach to DOM before promise resolves.</title>
|
||||
<link rel=help href="https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-decode">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<svg></svg>
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
promise_test(function() {
|
||||
var img = document.createElementNS('http://www.w3.org/2000/svg', 'image');
|
||||
img.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', "/images/green.png");
|
||||
const promise = img.decode().then(function(arg) {
|
||||
assert_equals(arg, undefined);
|
||||
});
|
||||
// Don't wait for the promise to resolve before attaching the image.
|
||||
// The promise should still resolve successfully.
|
||||
document.querySelector('svg').appendChild(img);
|
||||
return promise;
|
||||
}, document.title);
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue