mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision d55d764f159f5d8dd3e0b30e9d38f75af4feb438
This commit is contained in:
parent
bb5cd02da3
commit
865f7c03e9
228 changed files with 6505 additions and 2813 deletions
|
@ -0,0 +1,16 @@
|
|||
<!doctype html>
|
||||
<title>Adopt img from image document</title>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-img-element">
|
||||
<link rel="match" href="document-base-url-ref.html">
|
||||
<!-- Counteract any style added by the image document -->
|
||||
<style>img { width: initial; height: initial; }</style>
|
||||
<iframe></iframe>
|
||||
<script>
|
||||
var iframe = document.querySelector('iframe');
|
||||
iframe.onload = function() {
|
||||
let img = iframe.contentDocument.body.firstChild;
|
||||
document.body.appendChild(img);
|
||||
iframe.remove();
|
||||
};
|
||||
iframe.src = 'resources/cat.jpg';
|
||||
</script>
|
|
@ -3,7 +3,7 @@
|
|||
<meta name="timeout" content="long">
|
||||
<title>HTMLImageElement.prototype.decode(), iframe tests.</title>
|
||||
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
|
||||
<link rel=help href="https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-decode">
|
||||
<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>
|
||||
|
||||
|
@ -23,7 +23,7 @@ promise_test(function() {
|
|||
// At this point the frame which created the img is removed, so decode() should fail.
|
||||
frame.parentNode.removeChild(frame);
|
||||
img.decode().then(function() {
|
||||
assert_false(true, "Unexpected success");
|
||||
assert_unreached("Unexpected success");
|
||||
}, function() {
|
||||
resolve();
|
||||
});
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<title>HTMLImageElement.prototype.decode(), image document tests.</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>
|
||||
<iframe id="frame_imgdoc" src="about:blank"></iframe>
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
promise_test(function() {
|
||||
return new Promise(function(resolve) {
|
||||
var frame = document.getElementById("frame_imgdoc");
|
||||
// Load an image in the iframe and then replace that.
|
||||
frame.src = "/images/red.png";
|
||||
frame.onload = function() {
|
||||
let img = frame.contentDocument.body.firstElementChild;
|
||||
img.src = "/images/green.png";
|
||||
img.decode().then(function() {
|
||||
resolve();
|
||||
});
|
||||
};
|
||||
});
|
||||
}, document.title + " Decode from iframe with image document, succeeds (img not loaded)");
|
||||
</script>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue