mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Implement the Image NamedConstructor for HTMLImageElement
This commit is contained in:
parent
012be81eab
commit
d33579183a
6 changed files with 53 additions and 53 deletions
|
@ -14117,6 +14117,10 @@
|
|||
"path": "html/semantics/embedded-content/the-img-element/img.complete.html",
|
||||
"url": "/html/semantics/embedded-content/the-img-element/img.complete.html"
|
||||
},
|
||||
{
|
||||
"path": "html/semantics/embedded-content/the-img-element/Image-constructor.html",
|
||||
"url": "/html/semantics/embedded-content/the-img-element/Image-constructor.html"
|
||||
},
|
||||
{
|
||||
"path": "html/semantics/embedded-content/the-img-element/relevant-mutations.html",
|
||||
"url": "/html/semantics/embedded-content/the-img-element/relevant-mutations.html"
|
||||
|
@ -30594,4 +30598,4 @@
|
|||
"rev": "075802c1d3387d07e31cd5887459d539b1297c8d",
|
||||
"url_base": "/",
|
||||
"version": 2
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2745,18 +2745,6 @@
|
|||
[HTMLImageElement interface: document.createElement("img") must inherit property "lowsrc" with the proper type (14)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement must be primary interface of new Image()]
|
||||
expected: FAIL
|
||||
|
||||
[Stringification of new Image()]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "alt" with the proper type (0)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "src" with the proper type (1)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "srcset" with the proper type (2)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -2766,51 +2754,12 @@
|
|||
[HTMLImageElement interface: new Image() must inherit property "crossOrigin" with the proper type (4)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "useMap" with the proper type (5)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "isMap" with the proper type (6)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "width" with the proper type (7)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "height" with the proper type (8)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "naturalWidth" with the proper type (9)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "naturalHeight" with the proper type (10)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "complete" with the proper type (11)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "currentSrc" with the proper type (12)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "name" with the proper type (13)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "lowsrc" with the proper type (14)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "align" with the proper type (15)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "hspace" with the proper type (16)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "vspace" with the proper type (17)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "longDesc" with the proper type (18)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLImageElement interface: new Image() must inherit property "border" with the proper type (19)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLIFrameElement interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -168,6 +168,7 @@ var interfaceNamesInGlobalScope = [
|
|||
"HTMLUnknownElement",
|
||||
"HTMLVideoElement",
|
||||
"ImageData",
|
||||
"Image",
|
||||
"KeyboardEvent",
|
||||
"Location",
|
||||
"MessageEvent",
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE HTML>
|
||||
<title>DOM Image constructor Test</title>
|
||||
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element" />
|
||||
<meta name="assert" content="Tests the Image constructor for the img-element">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
var img = new Image();
|
||||
assert_true(img != undefined);
|
||||
}, "Image constructor works");
|
||||
|
||||
test(function() {
|
||||
assert_true(Image.prototype === HTMLImageElement.prototype);
|
||||
}, "Image and HTMLImageElement share a prototype");
|
||||
|
||||
test(function() {
|
||||
assert_true((new Image()).localName === "img");
|
||||
}, "Image localName is img");
|
||||
|
||||
test(function() {
|
||||
assert_true((new Image()).namespaceURI === "http://www.w3.org/1999/xhtml");
|
||||
}, "Image namespace URI is correct");
|
||||
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue