Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (196882 => 196883)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2016-02-22 01:23:07 UTC (rev 196882)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-02-22 01:27:43 UTC (rev 196883)
@@ -1,3 +1,23 @@
+2016-02-21 Chris Dumez <[email protected]>
+
+ Re-sync W3C HTML/DOM web-platform-tests
+ https://bugs.webkit.org/show_bug.cgi?id=154513
+
+ Reviewed by Darin Adler.
+
+ Re-sync W3C HTML/DOM web-platform-tests after:
+ - https://github.com/w3c/web-platform-tests/pull/2597
+ - https://github.com/w3c/web-platform-tests/pull/2598
+ - https://github.com/w3c/web-platform-tests/pull/2599
+
+ * web-platform-tests/html/dom/elements-embedded.js:
+ * web-platform-tests/html/dom/elements-misc.js:
+ * web-platform-tests/html/dom/interfaces.html:
+ * web-platform-tests/html/dom/reflection-embedded-expected.txt:
+ * web-platform-tests/html/dom/reflection-misc-expected.txt:
+ * web-platform-tests/html/dom/reflection.js:
+ (ReflectionTests.doReflects):
+
2016-02-19 Chris Dumez <[email protected]>
HTMLFormElement.autocomplete should only return known values
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/elements-embedded.js (196882 => 196883)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/elements-embedded.js 2016-02-22 01:23:07 UTC (rev 196882)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/elements-embedded.js 2016-02-22 01:27:43 UTC (rev 196883)
@@ -5,7 +5,7 @@
alt: "string",
src: "url",
srcset: "string",
- crossOrigin: {type: "enum", keywords: ["", "anonymous", "use-credentials"]},
+ crossOrigin: {type: "enum", keywords: ["anonymous", "use-credentials"], nonCanon:{"": "anonymous"}, isNullable: true, defaultVal: null, invalidVal: "anonymous"},
useMap: "string",
isMap: "boolean",
width: {type: "unsigned long", customGetter: true},
@@ -84,7 +84,7 @@
video: {
// HTMLMediaElement
src: "url",
- crossOrigin: {type: "enum", keywords: ["anonymous", "use-credentials"], nonCanon:{"": "anonymous"}},
+ crossOrigin: {type: "enum", keywords: ["anonymous", "use-credentials"], nonCanon:{"": "anonymous"}, isNullable: true, defaultVal: null, invalidVal: "anonymous"},
// As with "keytype", we have no missing value default defined here.
preload: {type: "enum", keywords: ["none", "metadata", "auto"], nonCanon: {"": "auto"}, defaultVal: null},
autoplay: "boolean",
@@ -100,7 +100,7 @@
audio: {
// HTMLMediaElement
src: "url",
- crossOrigin: {type: "enum", keywords: ["anonymous", "use-credentials"], nonCanon:{"": "anonymous"}},
+ crossOrigin: {type: "enum", keywords: ["anonymous", "use-credentials"], nonCanon:{"": "anonymous"}, isNullable: true, defaultVal: null, invalidVal: "anonymous"},
// As with "keytype", we have no missing value default defined here.
preload: {type: "enum", keywords: ["none", "metadata", "auto"], nonCanon: {"": "auto"}, defaultVal: null},
autoplay: "boolean",
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/elements-misc.js (196882 => 196883)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/elements-misc.js 2016-02-22 01:23:07 UTC (rev 196882)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/elements-misc.js 2016-02-22 01:27:43 UTC (rev 196883)
@@ -13,7 +13,7 @@
charset: "string",
// TODO: async attribute (complicated).
defer: "boolean",
- crossOrigin: {type: "enum", keywords: ["anonymous", "use-credentials"], nonCanon:{"": "anonymous"}},
+ crossOrigin: {type: "enum", keywords: ["anonymous", "use-credentials"], nonCanon:{"": "anonymous"}, isNullable: true, defaultVal: null, invalidVal: "anonymous"},
},
noscript: {},
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (196882 => 196883)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt 2016-02-22 01:23:07 UTC (rev 196882)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt 2016-02-22 01:27:43 UTC (rev 196883)
@@ -751,31 +751,24 @@
PASS EventTarget interface: calling dispatchEvent(Event) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError
FAIL MouseEvent interface: attribute region assert_true: The prototype object must have a property "region" expected true got false
FAIL Touch interface: attribute region assert_own_property: self does not have own property "Touch" expected property "Touch" missing
-FAIL HTMLAllCollection interface: existence and properties of interface object assert_equals: prototype of HTMLAllCollection is not HTMLCollection expected function "function HTMLCollection() {
- [native code]
-}" but got function "function () {
- [native code]
-}"
+PASS HTMLAllCollection interface: existence and properties of interface object
PASS HTMLAllCollection interface object length
PASS HTMLAllCollection interface object name
-FAIL HTMLAllCollection interface: existence and properties of interface prototype object assert_equals: prototype of HTMLAllCollection.prototype is not HTMLCollection.prototype expected object "[object HTMLCollectionPrototype]" but got object "[object Object]"
+PASS HTMLAllCollection interface: existence and properties of interface prototype object
PASS HTMLAllCollection interface: existence and properties of interface prototype object's "constructor" property
+PASS HTMLAllCollection interface: attribute length
FAIL HTMLAllCollection interface: operation item(unsigned long) assert_equals: property has wrong .length expected 1 but got 0
FAIL HTMLAllCollection interface: operation item(DOMString) assert_equals: property has wrong .length expected 1 but got 0
PASS HTMLAllCollection interface: operation namedItem(DOMString)
FAIL HTMLAllCollection must be primary interface of document.all assert_equals: wrong typeof object expected "function" but got "undefined"
FAIL Stringification of document.all assert_equals: wrong typeof object expected "function" but got "undefined"
-FAIL HTMLAllCollection interface: document.all must inherit property "item" with the proper type (0) assert_equals: wrong typeof object expected "function" but got "undefined"
-FAIL HTMLAllCollection interface: calling item(unsigned long) on document.all with too few arguments must throw TypeError assert_equals: wrong typeof object expected "function" but got "undefined"
+FAIL HTMLAllCollection interface: document.all must inherit property "length" with the proper type (0) assert_equals: wrong typeof object expected "function" but got "undefined"
FAIL HTMLAllCollection interface: document.all must inherit property "item" with the proper type (1) assert_equals: wrong typeof object expected "function" but got "undefined"
+FAIL HTMLAllCollection interface: calling item(unsigned long) on document.all with too few arguments must throw TypeError assert_equals: wrong typeof object expected "function" but got "undefined"
+FAIL HTMLAllCollection interface: document.all must inherit property "item" with the proper type (2) assert_equals: wrong typeof object expected "function" but got "undefined"
FAIL HTMLAllCollection interface: calling item(DOMString) on document.all with too few arguments must throw TypeError assert_equals: wrong typeof object expected "function" but got "undefined"
-FAIL HTMLAllCollection interface: document.all must inherit property "namedItem" with the proper type (2) assert_equals: wrong typeof object expected "function" but got "undefined"
+FAIL HTMLAllCollection interface: document.all must inherit property "namedItem" with the proper type (3) assert_equals: wrong typeof object expected "function" but got "undefined"
FAIL HTMLAllCollection interface: calling namedItem(DOMString) on document.all with too few arguments must throw TypeError assert_equals: wrong typeof object expected "function" but got "undefined"
-FAIL HTMLCollection interface: document.all must inherit property "length" with the proper type (0) assert_equals: wrong typeof object expected "function" but got "undefined"
-FAIL HTMLCollection interface: document.all must inherit property "item" with the proper type (1) assert_equals: wrong typeof object expected "function" but got "undefined"
-FAIL HTMLCollection interface: calling item(unsigned long) on document.all with too few arguments must throw TypeError assert_equals: wrong typeof object expected "function" but got "undefined"
-FAIL HTMLCollection interface: document.all must inherit property "namedItem" with the proper type (2) assert_equals: wrong typeof object expected "function" but got "undefined"
-FAIL HTMLCollection interface: calling namedItem(DOMString) on document.all with too few arguments must throw TypeError assert_equals: wrong typeof object expected "function" but got "undefined"
PASS HTMLFormControlsCollection interface: existence and properties of interface object
PASS HTMLFormControlsCollection interface object length
PASS HTMLFormControlsCollection interface object name
@@ -1612,7 +1605,7 @@
PASS HTMLAnchorElement interface: attribute rev
PASS HTMLAnchorElement interface: attribute shape
PASS HTMLAnchorElement interface: attribute href
-FAIL HTMLAnchorElement interface: attribute origin assert_equals: setter must be function for PutForwards, Replaceable, or non-readonly attributes expected "function" but got "undefined"
+PASS HTMLAnchorElement interface: attribute origin
PASS HTMLAnchorElement interface: attribute protocol
FAIL HTMLAnchorElement interface: attribute username assert_true: The prototype object must have a property "username" expected true got false
FAIL HTMLAnchorElement interface: attribute password assert_true: The prototype object must have a property "password" expected true got false
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces.html (196882 => 196883)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces.html 2016-02-22 01:23:07 UTC (rev 196882)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces.html 2016-02-22 01:27:43 UTC (rev 196883)
@@ -859,7 +859,7 @@
[NoInterfaceObject, Exposed=Window]
interface HTMLHyperlinkElementUtils {
stringifier attribute USVString href;
- attribute USVString origin;
+ readonly attribute USVString origin;
attribute USVString protocol;
attribute USVString username;
attribute USVString password;
@@ -871,11 +871,11 @@
attribute USVString hash;
};
-interface HTMLAllCollection : HTMLCollection {
- // inherits length and 'getter'
- Element? item(unsigned long index);
+interface HTMLAllCollection {
+ readonly attribute unsigned long length;
+ getter Element? item(unsigned long index);
(HTMLCollection or Element)? item(DOMString name);
- legacycaller getter (HTMLCollection or Element)? namedItem(DOMString name); // shadows inherited namedItem()
+ legacycaller getter (HTMLCollection or Element)? namedItem(DOMString name);
};
interface HTMLFormControlsCollection : HTMLCollection {
@@ -1048,7 +1048,7 @@
interface HTMLLinkElement : HTMLElement {
attribute DOMString href;
- attribute DOMString crossOrigin;
+ attribute DOMString? crossOrigin;
attribute DOMString rel;
[PutForwards=value] readonly attribute DOMTokenList relList;
attribute DOMString media;
@@ -1173,7 +1173,7 @@
attribute DOMString src;
attribute DOMString srcset;
attribute DOMString sizes;
- attribute DOMString crossOrigin;
+ attribute DOMString? crossOrigin;
attribute DOMString useMap;
attribute boolean isMap;
attribute unsigned long width;
@@ -1286,7 +1286,7 @@
// network state
attribute DOMString src;
readonly attribute DOMString currentSrc;
- attribute DOMString crossOrigin;
+ attribute DOMString? crossOrigin;
const unsigned short NETWORK_EMPTY = 0;
const unsigned short NETWORK_IDLE = 1;
const unsigned short NETWORK_LOADING = 2;
@@ -1949,7 +1949,7 @@
attribute DOMString charset;
attribute boolean async;
attribute boolean defer;
- attribute DOMString crossOrigin;
+ attribute DOMString? crossOrigin;
attribute DOMString text;
// also has obsolete members
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt (196882 => 196883)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt 2016-02-22 01:23:07 UTC (rev 196882)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt 2016-02-22 01:27:43 UTC (rev 196883)
@@ -850,114 +850,115 @@
PASS img.srcset: IDL set to object "test-valueOf" should not throw
PASS img.srcset: IDL set to object "test-valueOf" followed by getAttribute()
PASS img.srcset: IDL set to object "test-valueOf" followed by IDL get
-PASS img.crossOrigin: typeof IDL attribute
-PASS img.crossOrigin: IDL get with DOM attribute unset
+FAIL img.crossOrigin: typeof IDL attribute assert_equals: expected "object" but got "string"
+FAIL img.crossOrigin: IDL get with DOM attribute unset assert_equals: expected (object) null but got (string) ""
PASS img.crossOrigin: setAttribute() to "" followed by getAttribute()
-PASS img.crossOrigin: setAttribute() to "" followed by IDL get
+FAIL img.crossOrigin: setAttribute() to "" followed by IDL get assert_equals: expected "anonymous" but got ""
PASS img.crossOrigin: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get assert_equals: expected "" but got " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo "
+FAIL img.crossOrigin: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get assert_equals: expected "anonymous" but got " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo "
PASS img.crossOrigin: setAttribute() to undefined followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to undefined followed by IDL get assert_equals: expected "" but got "undefined"
+FAIL img.crossOrigin: setAttribute() to undefined followed by IDL get assert_equals: expected "anonymous" but got "undefined"
PASS img.crossOrigin: setAttribute() to 7 followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to 7 followed by IDL get assert_equals: expected "" but got "7"
+FAIL img.crossOrigin: setAttribute() to 7 followed by IDL get assert_equals: expected "anonymous" but got "7"
PASS img.crossOrigin: setAttribute() to 1.5 followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to 1.5 followed by IDL get assert_equals: expected "" but got "1.5"
+FAIL img.crossOrigin: setAttribute() to 1.5 followed by IDL get assert_equals: expected "anonymous" but got "1.5"
PASS img.crossOrigin: setAttribute() to true followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to true followed by IDL get assert_equals: expected "" but got "true"
+FAIL img.crossOrigin: setAttribute() to true followed by IDL get assert_equals: expected "anonymous" but got "true"
PASS img.crossOrigin: setAttribute() to false followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to false followed by IDL get assert_equals: expected "" but got "false"
+FAIL img.crossOrigin: setAttribute() to false followed by IDL get assert_equals: expected "anonymous" but got "false"
PASS img.crossOrigin: setAttribute() to object "[object Object]" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to object "[object Object]" followed by IDL get assert_equals: expected "" but got "[object Object]"
+FAIL img.crossOrigin: setAttribute() to object "[object Object]" followed by IDL get assert_equals: expected "anonymous" but got "[object Object]"
PASS img.crossOrigin: setAttribute() to NaN followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to NaN followed by IDL get assert_equals: expected "" but got "NaN"
+FAIL img.crossOrigin: setAttribute() to NaN followed by IDL get assert_equals: expected "anonymous" but got "NaN"
PASS img.crossOrigin: setAttribute() to Infinity followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to Infinity followed by IDL get assert_equals: expected "" but got "Infinity"
+FAIL img.crossOrigin: setAttribute() to Infinity followed by IDL get assert_equals: expected "anonymous" but got "Infinity"
PASS img.crossOrigin: setAttribute() to -Infinity followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to -Infinity followed by IDL get assert_equals: expected "" but got "-Infinity"
+FAIL img.crossOrigin: setAttribute() to -Infinity followed by IDL get assert_equals: expected "anonymous" but got "-Infinity"
PASS img.crossOrigin: setAttribute() to "\0" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to "\0" followed by IDL get assert_equals: expected "" but got "\0"
+FAIL img.crossOrigin: setAttribute() to "\0" followed by IDL get assert_equals: expected "anonymous" but got "\0"
PASS img.crossOrigin: setAttribute() to null followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to null followed by IDL get assert_equals: expected "" but got "null"
+FAIL img.crossOrigin: setAttribute() to null followed by IDL get assert_equals: expected "anonymous" but got "null"
PASS img.crossOrigin: setAttribute() to object "test-toString" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to object "test-toString" followed by IDL get assert_equals: expected "" but got "test-toString"
+FAIL img.crossOrigin: setAttribute() to object "test-toString" followed by IDL get assert_equals: expected "anonymous" but got "test-toString"
PASS img.crossOrigin: setAttribute() to object "test-valueOf" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to object "test-valueOf" followed by IDL get assert_equals: expected "" but got "test-valueOf"
+FAIL img.crossOrigin: setAttribute() to object "test-valueOf" followed by IDL get assert_equals: expected "anonymous" but got "test-valueOf"
PASS img.crossOrigin: setAttribute() to "anonymous" followed by getAttribute()
PASS img.crossOrigin: setAttribute() to "anonymous" followed by IDL get
PASS img.crossOrigin: setAttribute() to "xanonymous" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to "xanonymous" followed by IDL get assert_equals: expected "" but got "xanonymous"
+FAIL img.crossOrigin: setAttribute() to "xanonymous" followed by IDL get assert_equals: expected "anonymous" but got "xanonymous"
PASS img.crossOrigin: setAttribute() to "anonymous\0" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to "anonymous\0" followed by IDL get assert_equals: expected "" but got "anonymous\0"
+FAIL img.crossOrigin: setAttribute() to "anonymous\0" followed by IDL get assert_equals: expected "anonymous" but got "anonymous\0"
PASS img.crossOrigin: setAttribute() to "nonymous" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to "nonymous" followed by IDL get assert_equals: expected "" but got "nonymous"
+FAIL img.crossOrigin: setAttribute() to "nonymous" followed by IDL get assert_equals: expected "anonymous" but got "nonymous"
PASS img.crossOrigin: setAttribute() to "ANONYMOUS" followed by getAttribute()
FAIL img.crossOrigin: setAttribute() to "ANONYMOUS" followed by IDL get assert_equals: expected "anonymous" but got "ANONYMOUS"
PASS img.crossOrigin: setAttribute() to "use-credentials" followed by getAttribute()
PASS img.crossOrigin: setAttribute() to "use-credentials" followed by IDL get
PASS img.crossOrigin: setAttribute() to "xuse-credentials" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to "xuse-credentials" followed by IDL get assert_equals: expected "" but got "xuse-credentials"
+FAIL img.crossOrigin: setAttribute() to "xuse-credentials" followed by IDL get assert_equals: expected "anonymous" but got "xuse-credentials"
PASS img.crossOrigin: setAttribute() to "use-credentials\0" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to "use-credentials\0" followed by IDL get assert_equals: expected "" but got "use-credentials\0"
+FAIL img.crossOrigin: setAttribute() to "use-credentials\0" followed by IDL get assert_equals: expected "anonymous" but got "use-credentials\0"
PASS img.crossOrigin: setAttribute() to "se-credentials" followed by getAttribute()
-FAIL img.crossOrigin: setAttribute() to "se-credentials" followed by IDL get assert_equals: expected "" but got "se-credentials"
+FAIL img.crossOrigin: setAttribute() to "se-credentials" followed by IDL get assert_equals: expected "anonymous" but got "se-credentials"
PASS img.crossOrigin: setAttribute() to "USE-CREDENTIALS" followed by getAttribute()
FAIL img.crossOrigin: setAttribute() to "USE-CREDENTIALS" followed by IDL get assert_equals: expected "use-credentials" but got "USE-CREDENTIALS"
PASS img.crossOrigin: IDL set to "" should not throw
PASS img.crossOrigin: IDL set to "" followed by getAttribute()
-PASS img.crossOrigin: IDL set to "" followed by IDL get
+FAIL img.crossOrigin: IDL set to "" followed by IDL get assert_equals: expected "anonymous" but got ""
PASS img.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " should not throw
PASS img.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by getAttribute()
-FAIL img.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get assert_equals: expected "" but got " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo "
+FAIL img.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get assert_equals: expected "anonymous" but got " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo "
PASS img.crossOrigin: IDL set to undefined should not throw
-PASS img.crossOrigin: IDL set to undefined followed by getAttribute()
-FAIL img.crossOrigin: IDL set to undefined followed by IDL get assert_equals: expected "" but got "undefined"
+FAIL img.crossOrigin: IDL set to undefined followed by getAttribute() assert_equals: expected (object) null but got (string) "undefined"
+FAIL img.crossOrigin: IDL set to undefined followed by IDL get assert_equals: expected (object) null but got (string) "undefined"
PASS img.crossOrigin: IDL set to 7 should not throw
PASS img.crossOrigin: IDL set to 7 followed by getAttribute()
-FAIL img.crossOrigin: IDL set to 7 followed by IDL get assert_equals: expected "" but got "7"
+FAIL img.crossOrigin: IDL set to 7 followed by IDL get assert_equals: expected "anonymous" but got "7"
PASS img.crossOrigin: IDL set to 1.5 should not throw
PASS img.crossOrigin: IDL set to 1.5 followed by getAttribute()
-FAIL img.crossOrigin: IDL set to 1.5 followed by IDL get assert_equals: expected "" but got "1.5"
+FAIL img.crossOrigin: IDL set to 1.5 followed by IDL get assert_equals: expected "anonymous" but got "1.5"
PASS img.crossOrigin: IDL set to true should not throw
PASS img.crossOrigin: IDL set to true followed by getAttribute()
-FAIL img.crossOrigin: IDL set to true followed by IDL get assert_equals: expected "" but got "true"
+FAIL img.crossOrigin: IDL set to true followed by IDL get assert_equals: expected "anonymous" but got "true"
PASS img.crossOrigin: IDL set to false should not throw
PASS img.crossOrigin: IDL set to false followed by getAttribute()
-FAIL img.crossOrigin: IDL set to false followed by IDL get assert_equals: expected "" but got "false"
+FAIL img.crossOrigin: IDL set to false followed by IDL get assert_equals: expected "anonymous" but got "false"
PASS img.crossOrigin: IDL set to object "[object Object]" should not throw
PASS img.crossOrigin: IDL set to object "[object Object]" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to object "[object Object]" followed by IDL get assert_equals: expected "" but got "[object Object]"
+FAIL img.crossOrigin: IDL set to object "[object Object]" followed by IDL get assert_equals: expected "anonymous" but got "[object Object]"
PASS img.crossOrigin: IDL set to NaN should not throw
PASS img.crossOrigin: IDL set to NaN followed by getAttribute()
-FAIL img.crossOrigin: IDL set to NaN followed by IDL get assert_equals: expected "" but got "NaN"
+FAIL img.crossOrigin: IDL set to NaN followed by IDL get assert_equals: expected "anonymous" but got "NaN"
PASS img.crossOrigin: IDL set to Infinity should not throw
PASS img.crossOrigin: IDL set to Infinity followed by getAttribute()
-FAIL img.crossOrigin: IDL set to Infinity followed by IDL get assert_equals: expected "" but got "Infinity"
+FAIL img.crossOrigin: IDL set to Infinity followed by IDL get assert_equals: expected "anonymous" but got "Infinity"
PASS img.crossOrigin: IDL set to -Infinity should not throw
PASS img.crossOrigin: IDL set to -Infinity followed by getAttribute()
-FAIL img.crossOrigin: IDL set to -Infinity followed by IDL get assert_equals: expected "" but got "-Infinity"
+FAIL img.crossOrigin: IDL set to -Infinity followed by IDL get assert_equals: expected "anonymous" but got "-Infinity"
PASS img.crossOrigin: IDL set to "\0" should not throw
PASS img.crossOrigin: IDL set to "\0" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to "\0" followed by IDL get assert_equals: expected "" but got "\0"
+FAIL img.crossOrigin: IDL set to "\0" followed by IDL get assert_equals: expected "anonymous" but got "\0"
PASS img.crossOrigin: IDL set to null should not throw
-FAIL img.crossOrigin: IDL set to null followed by IDL get assert_equals: expected "" but got "null"
+FAIL img.crossOrigin: IDL set to null followed by getAttribute() assert_equals: expected (object) null but got (string) "null"
+FAIL img.crossOrigin: IDL set to null followed by IDL get assert_equals: expected (object) null but got (string) "null"
PASS img.crossOrigin: IDL set to object "test-toString" should not throw
PASS img.crossOrigin: IDL set to object "test-toString" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to object "test-toString" followed by IDL get assert_equals: expected "" but got "test-toString"
+FAIL img.crossOrigin: IDL set to object "test-toString" followed by IDL get assert_equals: expected "anonymous" but got "test-toString"
PASS img.crossOrigin: IDL set to object "test-valueOf" should not throw
PASS img.crossOrigin: IDL set to object "test-valueOf" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to object "test-valueOf" followed by IDL get assert_equals: expected "" but got "test-valueOf"
+FAIL img.crossOrigin: IDL set to object "test-valueOf" followed by IDL get assert_equals: expected "anonymous" but got "test-valueOf"
PASS img.crossOrigin: IDL set to "anonymous" should not throw
PASS img.crossOrigin: IDL set to "anonymous" followed by getAttribute()
PASS img.crossOrigin: IDL set to "anonymous" followed by IDL get
PASS img.crossOrigin: IDL set to "xanonymous" should not throw
PASS img.crossOrigin: IDL set to "xanonymous" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to "xanonymous" followed by IDL get assert_equals: expected "" but got "xanonymous"
+FAIL img.crossOrigin: IDL set to "xanonymous" followed by IDL get assert_equals: expected "anonymous" but got "xanonymous"
PASS img.crossOrigin: IDL set to "anonymous\0" should not throw
PASS img.crossOrigin: IDL set to "anonymous\0" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to "anonymous\0" followed by IDL get assert_equals: expected "" but got "anonymous\0"
+FAIL img.crossOrigin: IDL set to "anonymous\0" followed by IDL get assert_equals: expected "anonymous" but got "anonymous\0"
PASS img.crossOrigin: IDL set to "nonymous" should not throw
PASS img.crossOrigin: IDL set to "nonymous" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to "nonymous" followed by IDL get assert_equals: expected "" but got "nonymous"
+FAIL img.crossOrigin: IDL set to "nonymous" followed by IDL get assert_equals: expected "anonymous" but got "nonymous"
PASS img.crossOrigin: IDL set to "ANONYMOUS" should not throw
PASS img.crossOrigin: IDL set to "ANONYMOUS" followed by getAttribute()
FAIL img.crossOrigin: IDL set to "ANONYMOUS" followed by IDL get assert_equals: expected "anonymous" but got "ANONYMOUS"
@@ -966,13 +967,13 @@
PASS img.crossOrigin: IDL set to "use-credentials" followed by IDL get
PASS img.crossOrigin: IDL set to "xuse-credentials" should not throw
PASS img.crossOrigin: IDL set to "xuse-credentials" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to "xuse-credentials" followed by IDL get assert_equals: expected "" but got "xuse-credentials"
+FAIL img.crossOrigin: IDL set to "xuse-credentials" followed by IDL get assert_equals: expected "anonymous" but got "xuse-credentials"
PASS img.crossOrigin: IDL set to "use-credentials\0" should not throw
PASS img.crossOrigin: IDL set to "use-credentials\0" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to "use-credentials\0" followed by IDL get assert_equals: expected "" but got "use-credentials\0"
+FAIL img.crossOrigin: IDL set to "use-credentials\0" followed by IDL get assert_equals: expected "anonymous" but got "use-credentials\0"
PASS img.crossOrigin: IDL set to "se-credentials" should not throw
PASS img.crossOrigin: IDL set to "se-credentials" followed by getAttribute()
-FAIL img.crossOrigin: IDL set to "se-credentials" followed by IDL get assert_equals: expected "" but got "se-credentials"
+FAIL img.crossOrigin: IDL set to "se-credentials" followed by IDL get assert_equals: expected "anonymous" but got "se-credentials"
PASS img.crossOrigin: IDL set to "USE-CREDENTIALS" should not throw
PASS img.crossOrigin: IDL set to "USE-CREDENTIALS" followed by getAttribute()
FAIL img.crossOrigin: IDL set to "USE-CREDENTIALS" followed by IDL get assert_equals: expected "use-credentials" but got "USE-CREDENTIALS"
@@ -9020,8 +9021,8 @@
PASS video.src: IDL set to object "test-valueOf" should not throw
PASS video.src: IDL set to object "test-valueOf" followed by getAttribute()
PASS video.src: IDL set to object "test-valueOf" followed by IDL get
-FAIL video.crossOrigin: typeof IDL attribute assert_equals: expected "string" but got "undefined"
-FAIL video.crossOrigin: IDL get with DOM attribute unset assert_equals: expected (string) "" but got (undefined) undefined
+FAIL video.crossOrigin: typeof IDL attribute assert_equals: expected "object" but got "undefined"
+FAIL video.crossOrigin: IDL get with DOM attribute unset assert_equals: expected (object) null but got (undefined) undefined
PASS video.crossOrigin: setAttribute() to "" followed by getAttribute()
FAIL video.crossOrigin: setAttribute() to "" followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined
PASS video.crossOrigin: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by getAttribute()
@@ -9079,8 +9080,8 @@
FAIL video.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by getAttribute() assert_equals: expected " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " but got "USE-CREDENTIALS"
FAIL video.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get assert_equals: expected "anonymous" but got " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo "
PASS video.crossOrigin: IDL set to undefined should not throw
-FAIL video.crossOrigin: IDL set to undefined followed by getAttribute() assert_equals: expected "undefined" but got "USE-CREDENTIALS"
-FAIL video.crossOrigin: IDL set to undefined followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined
+FAIL video.crossOrigin: IDL set to undefined followed by getAttribute() assert_equals: expected (object) null but got (string) "USE-CREDENTIALS"
+FAIL video.crossOrigin: IDL set to undefined followed by IDL get assert_equals: expected (object) null but got (undefined) undefined
PASS video.crossOrigin: IDL set to 7 should not throw
FAIL video.crossOrigin: IDL set to 7 followed by getAttribute() assert_equals: expected "7" but got "USE-CREDENTIALS"
FAIL video.crossOrigin: IDL set to 7 followed by IDL get assert_equals: expected (string) "anonymous" but got (number) 7
@@ -9109,7 +9110,8 @@
FAIL video.crossOrigin: IDL set to "\0" followed by getAttribute() assert_equals: expected "\0" but got "USE-CREDENTIALS"
FAIL video.crossOrigin: IDL set to "\0" followed by IDL get assert_equals: expected "anonymous" but got "\0"
PASS video.crossOrigin: IDL set to null should not throw
-FAIL video.crossOrigin: IDL set to null followed by IDL get assert_equals: expected (string) "anonymous" but got (object) null
+FAIL video.crossOrigin: IDL set to null followed by getAttribute() assert_equals: expected (object) null but got (string) "USE-CREDENTIALS"
+PASS video.crossOrigin: IDL set to null followed by IDL get
PASS video.crossOrigin: IDL set to object "test-toString" should not throw
FAIL video.crossOrigin: IDL set to object "test-toString" followed by getAttribute() assert_equals: expected "test-toString" but got "USE-CREDENTIALS"
FAIL video.crossOrigin: IDL set to object "test-toString" followed by IDL get assert_equals: expected (string) "anonymous" but got (object) object "test-toString"
@@ -10821,8 +10823,8 @@
PASS audio.src: IDL set to object "test-valueOf" should not throw
PASS audio.src: IDL set to object "test-valueOf" followed by getAttribute()
PASS audio.src: IDL set to object "test-valueOf" followed by IDL get
-FAIL audio.crossOrigin: typeof IDL attribute assert_equals: expected "string" but got "undefined"
-FAIL audio.crossOrigin: IDL get with DOM attribute unset assert_equals: expected (string) "" but got (undefined) undefined
+FAIL audio.crossOrigin: typeof IDL attribute assert_equals: expected "object" but got "undefined"
+FAIL audio.crossOrigin: IDL get with DOM attribute unset assert_equals: expected (object) null but got (undefined) undefined
PASS audio.crossOrigin: setAttribute() to "" followed by getAttribute()
FAIL audio.crossOrigin: setAttribute() to "" followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined
PASS audio.crossOrigin: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by getAttribute()
@@ -10880,8 +10882,8 @@
FAIL audio.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by getAttribute() assert_equals: expected " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " but got "USE-CREDENTIALS"
FAIL audio.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get assert_equals: expected "anonymous" but got " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo "
PASS audio.crossOrigin: IDL set to undefined should not throw
-FAIL audio.crossOrigin: IDL set to undefined followed by getAttribute() assert_equals: expected "undefined" but got "USE-CREDENTIALS"
-FAIL audio.crossOrigin: IDL set to undefined followed by IDL get assert_equals: expected (string) "anonymous" but got (undefined) undefined
+FAIL audio.crossOrigin: IDL set to undefined followed by getAttribute() assert_equals: expected (object) null but got (string) "USE-CREDENTIALS"
+FAIL audio.crossOrigin: IDL set to undefined followed by IDL get assert_equals: expected (object) null but got (undefined) undefined
PASS audio.crossOrigin: IDL set to 7 should not throw
FAIL audio.crossOrigin: IDL set to 7 followed by getAttribute() assert_equals: expected "7" but got "USE-CREDENTIALS"
FAIL audio.crossOrigin: IDL set to 7 followed by IDL get assert_equals: expected (string) "anonymous" but got (number) 7
@@ -10910,7 +10912,8 @@
FAIL audio.crossOrigin: IDL set to "\0" followed by getAttribute() assert_equals: expected "\0" but got "USE-CREDENTIALS"
FAIL audio.crossOrigin: IDL set to "\0" followed by IDL get assert_equals: expected "anonymous" but got "\0"
PASS audio.crossOrigin: IDL set to null should not throw
-FAIL audio.crossOrigin: IDL set to null followed by IDL get assert_equals: expected (string) "anonymous" but got (object) null
+FAIL audio.crossOrigin: IDL set to null followed by getAttribute() assert_equals: expected (object) null but got (string) "USE-CREDENTIALS"
+PASS audio.crossOrigin: IDL set to null followed by IDL get
PASS audio.crossOrigin: IDL set to object "test-toString" should not throw
FAIL audio.crossOrigin: IDL set to object "test-toString" followed by getAttribute() assert_equals: expected "test-toString" but got "USE-CREDENTIALS"
FAIL audio.crossOrigin: IDL set to object "test-toString" followed by IDL get assert_equals: expected (string) "anonymous" but got (object) object "test-toString"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt (196882 => 196883)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt 2016-02-22 01:23:07 UTC (rev 196882)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt 2016-02-22 01:27:43 UTC (rev 196883)
@@ -1760,8 +1760,8 @@
PASS script.defer: IDL set to object "test-valueOf" should not throw
PASS script.defer: IDL set to object "test-valueOf" followed by hasAttribute()
PASS script.defer: IDL set to object "test-valueOf" followed by IDL get
-PASS script.crossOrigin: typeof IDL attribute
-PASS script.crossOrigin: IDL get with DOM attribute unset
+FAIL script.crossOrigin: typeof IDL attribute assert_equals: expected "object" but got "string"
+FAIL script.crossOrigin: IDL get with DOM attribute unset assert_equals: expected (object) null but got (string) ""
PASS script.crossOrigin: setAttribute() to "" followed by getAttribute()
FAIL script.crossOrigin: setAttribute() to "" followed by IDL get assert_equals: expected "anonymous" but got ""
PASS script.crossOrigin: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by getAttribute()
@@ -1819,8 +1819,8 @@
PASS script.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by getAttribute()
FAIL script.crossOrigin: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo " followed by IDL get assert_equals: expected "anonymous" but got " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f foo "
PASS script.crossOrigin: IDL set to undefined should not throw
-PASS script.crossOrigin: IDL set to undefined followed by getAttribute()
-FAIL script.crossOrigin: IDL set to undefined followed by IDL get assert_equals: expected "anonymous" but got "undefined"
+FAIL script.crossOrigin: IDL set to undefined followed by getAttribute() assert_equals: expected (object) null but got (string) "undefined"
+FAIL script.crossOrigin: IDL set to undefined followed by IDL get assert_equals: expected (object) null but got (string) "undefined"
PASS script.crossOrigin: IDL set to 7 should not throw
PASS script.crossOrigin: IDL set to 7 followed by getAttribute()
FAIL script.crossOrigin: IDL set to 7 followed by IDL get assert_equals: expected "anonymous" but got "7"
@@ -1849,7 +1849,8 @@
PASS script.crossOrigin: IDL set to "\0" followed by getAttribute()
FAIL script.crossOrigin: IDL set to "\0" followed by IDL get assert_equals: expected "anonymous" but got "\0"
PASS script.crossOrigin: IDL set to null should not throw
-FAIL script.crossOrigin: IDL set to null followed by IDL get assert_equals: expected "anonymous" but got "null"
+FAIL script.crossOrigin: IDL set to null followed by getAttribute() assert_equals: expected (object) null but got (string) "null"
+FAIL script.crossOrigin: IDL set to null followed by IDL get assert_equals: expected (object) null but got (string) "null"
PASS script.crossOrigin: IDL set to object "test-toString" should not throw
PASS script.crossOrigin: IDL set to object "test-toString" followed by getAttribute()
FAIL script.crossOrigin: IDL set to object "test-toString" followed by IDL get assert_equals: expected "anonymous" but got "test-toString"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection.js (196882 => 196883)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection.js 2016-02-22 01:23:07 UTC (rev 196882)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection.js 2016-02-22 01:27:43 UTC (rev 196883)
@@ -271,6 +271,7 @@
* "keywords": array of keywords as given by the spec (required)
* "nonCanon": dictionary mapping non-canonical values to their
* canonical equivalents (defaults to {})
+ * "isNullable": Indicates if attribute is nullable (defaults to false)
*
* Tests are mostly hardcoded into reflects(), since they depend on the
* keywords. All expected values are computed in reflects() using a helper
@@ -592,9 +593,14 @@
var typeInfo = this.typeMap[data.type];
+ if (typeof data.isNullable == "undefined") {
+ data.isNullable = false;
+ }
+
// Test that typeof idlObj[idlName] is correct. If not, further tests are
// probably pointless, so bail out.
- if (!ReflectionHarness.test(typeof idlObj[idlName], typeInfo.jsType, "typeof IDL attribute")) {
+ var isDefaultValueNull = data.isNullable && data.defaultVal === null;
+ if (!ReflectionHarness.test(typeof idlObj[idlName], isDefaultValueNull ? "object" : typeInfo.jsType, "typeof IDL attribute")) {
return;
}
@@ -603,7 +609,7 @@
if (defaultVal === undefined) {
defaultVal = typeInfo.defaultVal;
}
- if (defaultVal !== null) {
+ if (defaultVal !== null || data.isNullable) {
ReflectionHarness.test(idlObj[idlName], defaultVal, "IDL get with DOM attribute unset");
}
@@ -650,7 +656,14 @@
// Per spec, the expected DOM values are the same as the value we set
// it to.
- idlDomExpected = idlTests.slice(0);
+ if (!data.isNullable) {
+ idlDomExpected = idlTests.slice(0);
+ } else {
+ idlDomExpected = [];
+ for (var i = 0; i < idlTests.length; i++) {
+ idlDomExpected.push((idlTests[i] === null || idlTests[i] === undefined) ? null : idlTests[i]);
+ }
+ }
// Now we have the fun of calculating what the expected IDL values are.
domExpected = [];
@@ -659,7 +672,11 @@
domExpected.push(this.enumExpected(data.keywords, data.nonCanon, data.invalidVal, domTests[i]));
}
for (var i = 0; i < idlTests.length; i++) {
- idlIdlExpected.push(this.enumExpected(data.keywords, data.nonCanon, data.invalidVal, idlTests[i]));
+ if (data.isNullable && (idlTests[i] === null || idlTests[i] === undefined)) {
+ idlIdlExpected.push(null);
+ } else {
+ idlIdlExpected.push(this.enumExpected(data.keywords, data.nonCanon, data.invalidVal, idlTests[i]));
+ }
}
break;
@@ -687,7 +704,7 @@
if (!data.customGetter) {
for (var i = 0; i < domTests.length; i++) {
- if (domExpected[i] === null) {
+ if (domExpected[i] === null && !data.isNullable) {
// If you follow all the complicated logic here, you'll find that
// this will only happen if there's no expected value at all (like
// for tabIndex, where the default is too complicated). So skip
@@ -723,10 +740,14 @@
if (data.type == "boolean") {
// Special case yay
ReflectionHarness.test(domObj.hasAttribute(domName), Boolean(idlTests[i]), "IDL set to " + ReflectionHarness.stringRep(idlTests[i]) + " followed by hasAttribute()");
- } else if (idlDomExpected[i] !== null) {
- ReflectionHarness.test(domObj.getAttribute(domName), idlDomExpected[i] + "", "IDL set to " + ReflectionHarness.stringRep(idlTests[i]) + " followed by getAttribute()");
+ } else if (idlDomExpected[i] !== null || data.isNullable) {
+ var expected = idlDomExpected[i] + "";
+ if (data.isNullable && idlDomExpected[i] === null) {
+ expected = null;
+ }
+ ReflectionHarness.test(domObj.getAttribute(domName), expected, "IDL set to " + ReflectionHarness.stringRep(idlTests[i]) + " followed by getAttribute()");
}
- if (idlIdlExpected[i] !== null) {
+ if (idlIdlExpected[i] !== null || data.isNullable) {
ReflectionHarness.test(idlObj[idlName], idlIdlExpected[i], "IDL set to " + ReflectionHarness.stringRep(idlTests[i]) + " followed by IDL get");
}
if (ReflectionHarness.catchUnexpectedExceptions) {