From ba4eff3e74b482f6fbdda4d9a4bdc4197bf91bb7 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sat, 4 May 2013 17:55:29 +1000 Subject: [PATCH 001/116] Record some notes on features to use as the basis of Web IDL tests. --- WebIDL/tests/submissions/heycam/features.txt | 578 +++++++++++++++++++ 1 file changed, 578 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/features.txt diff --git a/WebIDL/tests/submissions/heycam/features.txt b/WebIDL/tests/submissions/heycam/features.txt new file mode 100644 index 00000000000000..edeb9f9b1d4770 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/features.txt @@ -0,0 +1,578 @@ +Some rough notes on features to use as the basis of Web IDL tests. + + +Features +-------- + +interface + DOMImplementation - http://dom.spec.whatwg.org/#interface-domimplementation + HTMLCollection - http://dom.spec.whatwg.org/#interface-htmlcollection + +interface inheritance + Element - http://dom.spec.whatwg.org/#interface-element + UIEvent - http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-UIEvent + +callback interface + EventListener - http://dom.spec.whatwg.org/#eventlistener (single operation) + NodeFilter - http://dom.spec.whatwg.org/#nodefilter (single operation, plus consts) + (any multiple operation callback interfaces?) + +partial interface + Document deprecated things - http://www.whatwg.org/specs/web-apps/current-work/#Document-partial + HTMLAnchorElement deprecated things - http://www.whatwg.org/specs/web-apps/current-work/#HTMLAnchorElement-partial + +constant on a normal interface + HTMLMediaElement.NETWORK_IDLE - http://www.whatwg.org/specs/web-apps/current-work/#htmlmediaelement + SVGLength.SVG_LENGTHTYPE_NUMBER - https://svgwg.org/svg2-draft/types.html#InterfaceSVGLength + +constant on a callback interface + NodeFilter.SHOW_ALL - http://dom.spec.whatwg.org/#nodefilter + ?? + +constant on an exception + DOMException.INVALID_STATE_ERR - http://dom.spec.whatwg.org/#domexception + ?? + +attribute + Document.title - http://www.whatwg.org/specs/web-apps/current-work/#document + HTMLSelectElement.length - http://www.whatwg.org/specs/web-apps/current-work/#htmlselectelement + +read only attribute + Node.parentNode - http://dom.spec.whatwg.org/#node + HTMLFormElement.length - http://www.whatwg.org/specs/web-apps/current-work/#htmlformelement + +attribute that inherits its getter + ?? + +stringifier on DOMString attribute + URLUtils.href - http://url.spec.whatwg.org/#urlutils + ?? + +regular operation + HTMLElement.click - http://www.whatwg.org/specs/web-apps/current-work/#htmlelement + Node.appendChild - http://dom.spec.whatwg.org/#node + +static operation + ?? + +variadic operation + Document.write - http://www.whatwg.org/specs/web-apps/current-work/#document + ParentNode.append - http://dom.spec.whatwg.org/#parentnode (too new?) + +optional argument + Window.postMessage - http://www.whatwg.org/specs/web-apps/current-work/#window + DOMImplementation.createHTMLDocument - http://dom.spec.whatwg.org/#domimplementation + +optional argument default value + Node.cloneNode - http://dom.spec.whatwg.org/#node + HTMLSelectElement.add - http://www.whatwg.org/specs/web-apps/current-work/#htmlselectelement + +indexed getter on operation + NodeList.item - http://dom.spec.whatwg.org/#nodelist + HTMLSelectElement.item - http://www.whatwg.org/specs/web-apps/current-work/#htmlselectelement + +indexed getter not on an operation + HTMLFormElement getter - http://www.whatwg.org/specs/web-apps/current-work/#htmlformelement + AudioTrackList getter - http://www.whatwg.org/specs/web-apps/current-work/#audiotracklist + +indexed setter on an operation + ?? + +indexed setter not on an operation + HTMLSelectElement setter - http://www.whatwg.org/specs/web-apps/current-work/#htmlselectelement + HTMLOptionsCollection setter - http://www.whatwg.org/specs/web-apps/current-work/#htmloptionscollection + +indexed creator on an operation + ?? + +indexed creator not an operation + HTMLSelectElement creator - http://www.whatwg.org/specs/web-apps/current-work/#htmlselectelement + HTMLOptionsCollection creator - http://www.whatwg.org/specs/web-apps/current-work/#htmloptionscollection + +indexed deleter on an operation + -- + +indexed deleter not on an operation + -- + +named getter on operation + Storage.getItem - http://www.whatwg.org/specs/web-apps/current-work/#storage-0 + HTMLCollection.namedItem - http://dom.spec.whatwg.org/#htmlcollection + +named getter not on an operation + DOMStringMap getter - http://www.whatwg.org/specs/web-apps/current-work/#domstringmap + HTMLFormElement getter - http://www.whatwg.org/specs/web-apps/current-work/#htmlformelement + +named setter on an operation + Storage.setItem - http://www.whatwg.org/specs/web-apps/current-work/#storage-0 + ?? + +named setter not on an operation + DOMStringMap setter - http://www.whatwg.org/specs/web-apps/current-work/#domstringmap + DOMElementMap setter - http://www.whatwg.org/specs/web-apps/current-work/#domelementmap (too new?) + +named creator on an operation + Storage.setItem - http://www.whatwg.org/specs/web-apps/current-work/#storage-0 + ?? + +named creator not an operation + DOMStringMap creator - http://www.whatwg.org/specs/web-apps/current-work/#domstringmap + DOMElementMap creator - http://www.whatwg.org/specs/web-apps/current-work/#domelementmap (too new?) + +named deleter on an operation + Storage.removeItem - http://www.whatwg.org/specs/web-apps/current-work/#storage-0 + ?? + +named deleter not on an operation + DOMStringMap deleter - http://www.whatwg.org/specs/web-apps/current-work/#domstringmap + DOMElementMap deleter - http://www.whatwg.org/specs/web-apps/current-work/#domelementmap (too new?) + +legacy caller on an operation + HTMLAllCollection.namedItem - http://www.whatwg.org/specs/web-apps/current-work/#htmlallcollection + HTMLFormControlsCollection.namedItem - http://www.whatwg.org/specs/web-apps/current-work/#htmlformcontrolscollection + +legacy caller not on an operation + HTMLObjectElement legacycaller - http://www.whatwg.org/specs/web-apps/current-work/#htmlobjectelement + ?? + +stringifier on an operation + ?? + +stringifier not on an operation + DOMTokenList stringifier - http://dom.spec.whatwg.org/#domtokenlist + ?? + +overloaded operations + CanvasRenderingContext2D.drawImage - http://www.whatwg.org/specs/web-apps/current-work/#canvasrenderingcontext2d + FormData.append - http://xhr.spec.whatwg.org/#formdata + +dictionary + EventInit - http://dom.spec.whatwg.org/#event + IDBObjectStoreParameters - https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#options-object-concept + +dictionary inheritance + MessageEventInit - http://www.whatwg.org/specs/web-apps/current-work/#messageeventinit + CustomEventInit - http://dom.spec.whatwg.org/#customevent + +dictionary member default value + IDBObjectStoreParameters - https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#options-object-concept + CustomEventInit - http://dom.spec.whatwg.org/#customevent + +partial dictionary + partial MouseEventInit - http://www.whatwg.org/specs/web-apps/current-work/ (too new?) + ?? + +exception + DOMException - http://dom.spec.whatwg.org/#exception-domexception + ?? + +exception field + DOMException.code - http://dom.spec.whatwg.org/#exception-domexception + ?? + +exception inheritance + ?? + +exception name + HierarchyRequestError - http://dom.spec.whatwg.org/#error-names-table + VersionError - https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#exceptions0 + +exception message + (hard to test?) + +enumeration + DocumentReadyState - http://www.whatwg.org/specs/web-apps/current-work/#documentreadystate + XMLHttpRequestResponseType - http://xhr.spec.whatwg.org/#xmlhttprequestresponsetype + +callback function + EventHandlerNonNull - http://www.whatwg.org/specs/web-apps/current-work/#eventhandlernonnull + PortCollectionCallback - http://www.whatwg.org/specs/web-apps/current-work/#portcollectioncallback + +typedef + not really necessary + +implements + Document implements GlobalEventHandlers - http://www.whatwg.org/specs/web-apps/current-work/#document + Document implements ParentNode - http://dom.spec.whatwg.org/#parentnode + +implements with an interface on the rhs that inherits from another interface + ?? + +interface extended attributes: + [ArrayClass] + NodeList - http://dom.spec.whatwg.org/#nodelist + ?? + + [Constructor] + Event - http://dom.spec.whatwg.org/#event + XMLHttpRequest - http://xhr.spec.whatwg.org/#xmlhttprequest + + [ImplicitThis] + ?? + + [NamedConstructor] + Image - http://www.whatwg.org/specs/web-apps/current-work/#htmlimageelement + Audio - http://www.whatwg.org/specs/web-apps/current-work/#htmlaudioelement + + [NamedPropertiesObject] + Window - http://www.whatwg.org/specs/web-apps/current-work/#window + + [NoInterfaceObject] + WindowTimers - http://www.whatwg.org/specs/web-apps/current-work/#windowtimers + NavigatorID - http://www.whatwg.org/specs/web-apps/current-work/#navigatorid + + [OverrideBuiltins] + HTMLFormElement - http://www.whatwg.org/specs/web-apps/current-work/#htmlformelement + ?? + +partial interface extended attributes: + [NamedPropertiesObject] + ?? + + [OverrideBuiltins] + partial interface Document - http://www.whatwg.org/specs/web-apps/current-work/#document + +constant extended attributes: none + +attribute extended attributes: + [Clamp] + ?? + + [EnforceRange] + ?? + + [LenientThis] + Document.onreadystatechange - http://www.whatwg.org/specs/web-apps/current-work/#document + GlobalEventHandlers.onmouseenter - http://www.whatwg.org/specs/web-apps/current-work/#globaleventhandlers + + [PutForwards] + Document.location - http://www.whatwg.org/specs/web-apps/current-work/#document + HTMLElement.style - http://www.whatwg.org/specs/web-apps/current-work/#htmlelement + + [Replaceable] + Window.self - http://www.whatwg.org/specs/web-apps/current-work/#window + Window.length - http://www.whatwg.org/specs/web-apps/current-work/#window + + [TreatNullAs] + HTMLFrameElement.marginHeight - http://www.whatwg.org/specs/web-apps/current-work/#dom-frame-marginheight + CharacterData.data - http://dom.spec.whatwg.org/#characterdata + + [TreatUndefinedAs] + ?? + + [Unforgeable] + Window.document - http://www.whatwg.org/specs/web-apps/current-work/#window + Event.isTrusted - http://dom.spec.whatwg.org/#event (too new?) + +operation extended attributes: + [TreatNullAs] + ?? + + [TreatUndefinedAs] + ?? + +operation argument extended attributes: + [Clamp] + WebSocket.close - http://www.whatwg.org/specs/web-apps/current-work/#websocket (hard to test?) + Uint8ClampedArray.set - http://www.khronos.org/registry/typedarray/specs/latest/#7.1 + + [EnforceRange] + ?? + + [TreatNullAs] + DOMImplementation.createDocument - http://dom.spec.whatwg.org/#domimplementation + ?? + + [TreatUndefinedAs] + ?? + +dictionary extended attributes: none + +dictionary member extended attributes: + [Clamp] + ?? + + [EnforceRange] + ?? + +exception extended attributes: + [NoInterfaceObject] + ?? + +exception field extended attributes: none + +enumeration extended attributes: none + +callback function extended attributes: + [TreatNonCallableAsNull] + EventHandlerNonNull - http://www.whatwg.org/specs/web-apps/current-work/#eventhandlernonnull + OnErrorEventHandlerNonNull - http://www.whatwg.org/specs/web-apps/current-work/#onerroreventhandlernonnull + +typedef extended attributes: none +implements statement extended attributes: none + + + +Binding +------- + +4. ECMAScript binding + +* objects are [[Extensible]] = true by default (all objects actually) +* objects have [[Prototype]] = Object.prototype by default +* function objects have [[Class]] = "Function", [[Prototype]] = Function.prototype + + DONE + +4.1 ECMAScript environment + +* each environment has unique set of initial objects +* [[Prototype]]s are the same in a given environment +* Object.prototype.toString must be [[Writable]] = true, [[Enumerable]] = false, [[Configurable]] = true, + and stringifies objects to "[object ]". + + DONE + +4.2 ECMAScript type mapping + +* any, void, boolean, byte, octet, short, unsigned short, long, unsigned long, long long, unsigned long long, float, unrestricted float, double, unrestricted double, DOMString, object, interface type, dictionary type (order of member evaluation), enumeration type, callback function type, nullable, sequence, array, union, Date, + + TBD + +4.2.24.1 Platform array object [[GetOwnProperty]] method + +* "length" +* valid array index +* invalid array index +* other properties + + TBD + +4.2.24.2 Platform array object [[DefineOwnProperty]] method + +* "length" +* valid array index +* invalid array index +* other properties + + TBD + +4.2.24.3 Platform array object [[Delete]] method + +... + + TBD + +4.3 [ArrayClass] +4.3.2 [Clamp] +4.3.3 [Constructor] +4.3.4 [EnforceRange] +4.3.5 [ImplicitThis] +4.3.6 [LenientThis] +4.3.7 [NamedConstructor] +4.3.8 [NoInterfaceObject] +4.3.9 [OverrideBuiltins] +4.3.10 [PutForwards] +4.3.11 [Replaceable] +4.3.12 [NamedPropertiesObject] +4.3.13 [TreatNonCallableAsNull] +4.3.14 [TreatNullAs=EmptyString] +4.3.15 [TreatUndefinedAs={EmptyString,Null}] +4.3.16 [Unforgeable] + +4.4 Interfaces + +* interface object property exists for callback interfaces with constants and non-callback interfaces that aren't [NoInterfaceObject] +* is [[Writable]] = true, [[Enumerable]] = false, [[Configurable]] = true +* if [NamedConstructor], there is another property with the same attributes + +4.4.1 Interface object + +* is a function object +* .prototype is the interface prototype object +* interface object for a callback interface is not a function object, does not have .prototype. its [[Prototype]] is Object.prototype + +4.4.1.1 [[Call]] + +* overload resolution algorithm +* interface object [[Call]] +* must return an object that implements the interface (and is associated with the same environment), or throw +* if [Constructor], .length is [[Writable]] = false, [[Enumerable]] = false, [[Configurable]] = false, Number. +* .length is 0 if not [Constructor] ** how can this be? + +4.4.1.2 Interface object [[HasInstance]] method + +4.4.2 Named constructors + +* same .length as for [[Call]] +* also has .prototype [[Writable]] = false, [[Enumerable]] = false, [[Configurable]] = false, pointing to the interface prototype object + +4.4.3 Interface prototype object + +* if not [NoInterfaceObject], has .constructor [[Writable]] = true, [[Enumerable]] = false, [[Configurable]] = true, pointing to interface object +* [[Prototype]] can point to named properties object, if [NamedPropertiesObject], or the interface prototype object of the inherited interface, or Array.prototype if [ArrayClass], or Object.prototype +* class string "BlahPrototype" + +4.4.4 Named properties object + +* function object +* [[Prototype]] points to interface prototype object of inherited interface, or Array.prototype if [ArrayClass], or Object.prototype +* class string "BlahProperties" + +4.4.4.1 Named properties object [[GetOwnProperty]] method + +* returns [[Writable]] = false, [[Enumerable]] = true, [[Configurable]] = true for named properties + +4.4.5 Constants + +* property exists on interface object and interface prototype object +* [[Writable]] = false, [[Enumerable]] = true, [[Configurable]] = false + +4.4.6 Attributes + +* if [Unforgeable], on an instance. otherwise, on interface prototype object. +* accessor, [[Enumerable]] = true, [[Configurable]] = !!unforgeable +* attribute getter is function object; [LenientThis] => return undefined on wrong object +* attribute getter .length = 0 +* attribute setter is udnefined if readonly and not [PutForwards] and not [Replaceable]. +* setter throws if no arguments passed; > 1 arguments ignored +* if invalid this object and not [LenientThis], throw TypeError +* if [Replaceable], invokes [[DefineOwnProperty]] to replace it, [[Writable]] = true, [[Enumerable]] = true, [[Configurable]] = true +* if invalid this object and [LenientThis], returns +* if [PutForwards], ... +* assigning invalid enumeration types is ignored +* .length = 1 + +4.4.7 Operations + +* property exists on the interface prototype object (if regular) or interface object (if static) +* [[Writable]] = true, [[Enumerable]] = true, [[Configurable]] = true +* value is a function object +* [ImplicitThis] can turn null/undefined this value into the global +* throw TypeError if wrong this object +* .length is shortest valid argument count +* stringifiers => .toString, [[Writable]] = true, [[Enumerable]] = true, [[Configurable]] = true, function object +* stringifier on attribute calls [[Get]] with the attribute's property name +* stringifier on an operation gets the function with [[Get]] and calls it + +4.5 Implements statement + +4.6 Platform objects implementing interfaces + +* primary interface determines class string +* global environment can be changed + +4.6.1 Indexed and named properties + +* when [NamedPropertiesObject], named properties are exposed on that object and not on the instance +* Object.{freeze,seal,preventExtensions} throw TypeError on objects supporting indexed or named properties +* named property visibility algorithm, looks at [Unforgeable], supported property name, [OverrideBuiltins], ... + +4.6.2 Platform object [[GetOwnProperty]] method +4.6.2 Platform object [[DefineOwnProperty]] method +4.6.3 Platform object [[Delete]] method + +* ... indexed, named properties ... + +4.6.5 Platform object [[Call]] method + +* legacy caller + +4.6.6 Property enumeration + +* indexed properties first, numerical order +* then named properties, spec defined order +* remaining properties, no defined order + +4.7 User object implementing callback interfaces + +* single operation interface, any object apart from native Date and native RegExp can implement it +* if the object is callable, its [[Call]] is the implementation +* if the object is not callable, get the function with [[Get]] +* multiple operation interface, any object not a platform object and not a native Date or RegExp implements it +* how to invoke callback interface operation +* callback this value, null by default +* how to get/set callback interface attribute + +4.8 Invoking callback functions + +4.9 Exceptions + +* if not [NoInterfaceObject], property exists on global +* [[Writable]] = true, [[Enumerable]] = true, [[Configurable]] = true + +4.9.1 Exception interface object + +* function object +* .prototype is [[Writable]] = false, [[Enumerable]] = false, [[Configurable]] = false + +4.9.1.1 Exception interface object [[Call]] method + +* construct an object with [[Prototype]] set to the exception interface object, class string = the exception identifier +* if arg_0 is not undefined, sets .message to it with [[Writable]] = true, [[Enumerable]] = false, [[Configurable]] = true; + this shadows .message from Error.prototype + +4.9.2 Exception interface prototype object + +* [[Prototype]] is the inherited exception interface prototype object, or Error.prototype +* class string is "BlahPrototype" +* .name with [[Writable]] = true, [[Enumerable]] = false, [[Configurable]] = true +* if not [NoInterfaceObject], .constructor is [[Writable]] = true, [[Enumerable]] = false, [[Configurable]] = true; points to exception interface object + +4.9.3 Constants + +* property on exception interface prototype object and exception interface object +* [[Writable]] = false, [[Enumerable] = true, [[Configurable]] = false + +4.9.4 Exception fields + +* on exception interface prototype object +* [[Get]], [[Enumerable]] = true, [[Configurable]] = true +* exception field getter is a function object +* throws a TypeError with bad this +* .length is 0 + +4.10 Exception objects + +* if created through new, associated with that exception interface object's global environment +* [[Prototype]] is the exception interface prototype object +* [[Class]] is "Error" +* class string is the identifier of the exception + +4.11 Throwing exeptions + +* defines "current global environment", which is topmost Function for an attribute, operation, indexed property, named property, constructor, named constructor, stringifier, excpetion constructor or exception field getter. +* throwing an exception with optional name N, optional message M, follows some steps + +4.12 Handling exceptions + +* nothing + +5.1 DOMTimeStamp + +5.2 Function + +5.3 VoidFunction + + + +Objects +------- + +interface object +interface object for an inherited interface +interface prototype object +interface prototype object for an inherited interface +named constructor object +attribute getter +attribute setter +operation Function +stringifier Function +exception interface object +exception interface prototype object +exception field getter +platform object implementing an interface +platform object implementing an inherited interface +platform object representing an exception +platform array object +named properties object From a26923cd2efd146a2ca88f9cc5841e037b2cc693 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sat, 4 May 2013 17:55:57 +1000 Subject: [PATCH 002/116] Add a few Web IDL tests. --- .../submissions/heycam/ArrayClass-001.html | 22 ++++ .../submissions/heycam/Constructor-001.html | 63 +++++++++++ .../submissions/heycam/class-string-001.html | 100 ++++++++++++++++++ .../submissions/heycam/extensible-001.html | 94 ++++++++++++++++ .../submissions/heycam/functions-001.html | 55 ++++++++++ .../tests/submissions/heycam/initial-001.html | 83 +++++++++++++++ .../tests/submissions/heycam/initial-002.html | 87 +++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 7 ++ WebIDL/tests/submissions/heycam/utils.js | 29 +++++ 9 files changed, 540 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/ArrayClass-001.html create mode 100644 WebIDL/tests/submissions/heycam/Constructor-001.html create mode 100644 WebIDL/tests/submissions/heycam/class-string-001.html create mode 100644 WebIDL/tests/submissions/heycam/extensible-001.html create mode 100644 WebIDL/tests/submissions/heycam/functions-001.html create mode 100644 WebIDL/tests/submissions/heycam/initial-001.html create mode 100644 WebIDL/tests/submissions/heycam/initial-002.html create mode 100644 WebIDL/tests/submissions/heycam/manifest.txt create mode 100644 WebIDL/tests/submissions/heycam/utils.js diff --git a/WebIDL/tests/submissions/heycam/ArrayClass-001.html b/WebIDL/tests/submissions/heycam/ArrayClass-001.html new file mode 100644 index 00000000000000..0241a73b673468 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/ArrayClass-001.html @@ -0,0 +1,22 @@ + +[ArrayClass] + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/Constructor-001.html b/WebIDL/tests/submissions/heycam/Constructor-001.html new file mode 100644 index 00000000000000..d07d3991ea097b --- /dev/null +++ b/WebIDL/tests/submissions/heycam/Constructor-001.html @@ -0,0 +1,63 @@ + +[Constructor] + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/class-string-001.html b/WebIDL/tests/submissions/heycam/class-string-001.html new file mode 100644 index 00000000000000..5c5f2eb1952ace --- /dev/null +++ b/WebIDL/tests/submissions/heycam/class-string-001.html @@ -0,0 +1,100 @@ + +Object.prototype.toString looks at class strings + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/extensible-001.html b/WebIDL/tests/submissions/heycam/extensible-001.html new file mode 100644 index 00000000000000..fe46194d2f23bd --- /dev/null +++ b/WebIDL/tests/submissions/heycam/extensible-001.html @@ -0,0 +1,94 @@ + +Objects are extensible + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/functions-001.html b/WebIDL/tests/submissions/heycam/functions-001.html new file mode 100644 index 00000000000000..f54aaaf9201408 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/functions-001.html @@ -0,0 +1,55 @@ + +Function objects have correct [[Class]], [[Prototype]], typeof + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/initial-001.html b/WebIDL/tests/submissions/heycam/initial-001.html new file mode 100644 index 00000000000000..f07ac2affa1283 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/initial-001.html @@ -0,0 +1,83 @@ + +Initial objects are unique across global environments + + + +
+ + + +
+ +
diff --git a/WebIDL/tests/submissions/heycam/initial-002.html b/WebIDL/tests/submissions/heycam/initial-002.html new file mode 100644 index 00000000000000..5a4c7afe6376ae --- /dev/null +++ b/WebIDL/tests/submissions/heycam/initial-002.html @@ -0,0 +1,87 @@ + +Initial objects have [[Prototype]]s from the same global environment + + + +
+ + + +
+ +
diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt new file mode 100644 index 00000000000000..fdc6f936b98f60 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -0,0 +1,7 @@ +ArrayClass-001.html +Constructor-001.html +class-string-001.html +extensible-001.html +functions-001.html +initial-001.html +initial-002.html diff --git a/WebIDL/tests/submissions/heycam/utils.js b/WebIDL/tests/submissions/heycam/utils.js new file mode 100644 index 00000000000000..8d4a9aa79b1f8a --- /dev/null +++ b/WebIDL/tests/submissions/heycam/utils.js @@ -0,0 +1,29 @@ +// Utility functions for Web IDL tests. + +function interfaceObject(interfaceName, w) { + return function() { return (w || window)[interfaceName]; } +} + +function interfacePrototypeObject(interfaceName, w) { + return function() { return (w || window)[interfaceName].prototype; } +} + +function namedConstructorObject(constructorName, w) { + return function() { return (w || window)[constructorName]; } +} + +function getter(interfaceName, attributeName, w) { + return function() { return Object.getOwnPropertyDescriptor((w || window)[interfaceName].prototype, attributeName).get; } +} + +function setter(interfaceName, attributeName, w) { + return function() { return Object.getOwnPropertyDescriptor((w || window)[interfaceName].prototype, attributeName).set; } +} + +function operation(interfaceName, operationName, w) { + return function() { return Object.getOwnPropertyDescriptor((w || window)[interfaceName].prototype, operationName).value; } +} + +function stringifier(interfaceName, w) { + return operation(interfaceName, "toString", w); +} From 7322280ae2036dad62244fef87f434c5b45df48f Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 5 May 2013 10:33:16 +1000 Subject: [PATCH 003/116] Add a utility function for asserting a property descriptor's attributes. --- .../submissions/heycam/Constructor-001.html | 18 +------------- WebIDL/tests/submissions/heycam/utils.js | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/Constructor-001.html b/WebIDL/tests/submissions/heycam/Constructor-001.html index d07d3991ea097b..4150d86c3139c2 100644 --- a/WebIDL/tests/submissions/heycam/Constructor-001.html +++ b/WebIDL/tests/submissions/heycam/Constructor-001.html @@ -42,22 +42,6 @@ var intf = lengthProperties[i]; var val = lengthProperties[i + 1]; - var desc = Object.getOwnPropertyDescriptor(window[intf], "length"); - - test(function() { - assert_equals(desc.writable, false, intf + ".length [[Writable]]"); - }, intf + ".length is writable"); - - test(function() { - assert_equals(desc.enumerable, false, intf + ".length [[Enumerable]]"); - }, intf + ".length is enumerable"); - - test(function() { - assert_equals(desc.configurable, false, intf + ".length [[Configurable]]"); - }, intf + ".length is configurable"); - - test(function() { - assert_equals(desc.value, val, intf + ".length"); - }, intf + ".length reflects the constructor's minimum argument count"); + assert_property(window[intf], "length", { writable: false, enumerable: false, configurable: false, value: val }, intf + ".length"); } diff --git a/WebIDL/tests/submissions/heycam/utils.js b/WebIDL/tests/submissions/heycam/utils.js index 8d4a9aa79b1f8a..fdd47e10a54636 100644 --- a/WebIDL/tests/submissions/heycam/utils.js +++ b/WebIDL/tests/submissions/heycam/utils.js @@ -27,3 +27,27 @@ function operation(interfaceName, operationName, w) { function stringifier(interfaceName, w) { return operation(interfaceName, "toString", w); } + +function assert_property(object, property, descriptor, description) { + var desc = Object.getOwnPropertyDescriptor(object, property); + if ("writable" in descriptor) { + test(function() { + assert_equals(desc.writable, descriptor.writable, description + " [[Writable]]"); + }, description + " is " + (descriptor.writable ? "" : "not ") + " writable"); + } + if ("enumerable" in descriptor) { + test(function() { + assert_equals(desc.enumerable, descriptor.enumerable, description + " [[Enumerable]]"); + }, description + " is " + (descriptor.enumerable ? "" : "not ") + " enumerable"); + } + if ("configurable" in descriptor) { + test(function() { + assert_equals(desc.configurable, descriptor.configurable, description + " [[Configurable]]"); + }, description + " is " + (descriptor.configurable ? "" : "not ") + " configurable"); + } + if ("value" in descriptor) { + test(function() { + assert_equals(desc.value, descriptor.value, " [[Value]]"); + }, description + " has the expected value"); + } +} From b74950dc7f9d3149f4940f6c74819905ec4c52af Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 5 May 2013 10:33:39 +1000 Subject: [PATCH 004/116] A test for named constructor objects. --- .../heycam/NamedConstructor-001.html | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/NamedConstructor-001.html diff --git a/WebIDL/tests/submissions/heycam/NamedConstructor-001.html b/WebIDL/tests/submissions/heycam/NamedConstructor-001.html new file mode 100644 index 00000000000000..14aabc6e593588 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/NamedConstructor-001.html @@ -0,0 +1,50 @@ + +[NamedConstructor] + + + +
+ + From 696d45b8066906066b985f97c8b2c09f7fc8e2c1 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 5 May 2013 13:19:53 +1000 Subject: [PATCH 005/116] Don't use test in assert_properties; more helpers. --- .../submissions/heycam/Constructor-001.html | 4 +- .../heycam/NamedConstructor-001.html | 12 ++++-- WebIDL/tests/submissions/heycam/utils.js | 41 +++++++++++-------- 3 files changed, 35 insertions(+), 22 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/Constructor-001.html b/WebIDL/tests/submissions/heycam/Constructor-001.html index 4150d86c3139c2..1cb30583fb3976 100644 --- a/WebIDL/tests/submissions/heycam/Constructor-001.html +++ b/WebIDL/tests/submissions/heycam/Constructor-001.html @@ -42,6 +42,8 @@ var intf = lengthProperties[i]; var val = lengthProperties[i + 1]; - assert_property(window[intf], "length", { writable: false, enumerable: false, configurable: false, value: val }, intf + ".length"); + test(function() { + assert_property(window[intf], "length", { writable: false, enumerable: false, configurable: false, value: val }, intf + ".length"); + }, intf + " has correct length property"); } diff --git a/WebIDL/tests/submissions/heycam/NamedConstructor-001.html b/WebIDL/tests/submissions/heycam/NamedConstructor-001.html index 14aabc6e593588..f82e5c7c3248f7 100644 --- a/WebIDL/tests/submissions/heycam/NamedConstructor-001.html +++ b/WebIDL/tests/submissions/heycam/NamedConstructor-001.html @@ -43,8 +43,14 @@ var val = lengthProperties[i + 1]; var intf = lengthProperties[i + 2]; - assert_property(window, named, { writable: true, enumerable: false, configurable: true }, "window." + named); - assert_property(window[named], "length", { writable: false, enumerable: false, configurable: false, value: val }, named + ".length"); - assert_property(window[named], "prototype", { writable: false, enumerable: false, configurable: false, value: window[intf].prototype }, named + ".prototype"); + test(function() { + assert_property(window, named, { writable: true, enumerable: false, configurable: true }, "window." + named); + }, named + " named constructor exists"); + test(function() { + assert_property(window[named], "length", { writable: false, enumerable: false, configurable: false, value: val }, named + ".length"); + }, named + " has correct length property"); + test(function() { + assert_property(window[named], "prototype", { writable: false, enumerable: false, configurable: false, value: window[intf].prototype }, named + ".prototype"); + }, named + " has correct prototype property"); } diff --git a/WebIDL/tests/submissions/heycam/utils.js b/WebIDL/tests/submissions/heycam/utils.js index fdd47e10a54636..52522ab462822b 100644 --- a/WebIDL/tests/submissions/heycam/utils.js +++ b/WebIDL/tests/submissions/heycam/utils.js @@ -28,26 +28,31 @@ function stringifier(interfaceName, w) { return operation(interfaceName, "toString", w); } -function assert_property(object, property, descriptor, description) { - var desc = Object.getOwnPropertyDescriptor(object, property); - if ("writable" in descriptor) { - test(function() { - assert_equals(desc.writable, descriptor.writable, description + " [[Writable]]"); - }, description + " is " + (descriptor.writable ? "" : "not ") + " writable"); +function assert_descriptor(desc1, desc2, description) { + assert_true(!!desc1, description + " exists"); + if ("value" in desc2) { + assert_equals(desc1.value, desc2.value, description + " [[Value]]"); } - if ("enumerable" in descriptor) { - test(function() { - assert_equals(desc.enumerable, descriptor.enumerable, description + " [[Enumerable]]"); - }, description + " is " + (descriptor.enumerable ? "" : "not ") + " enumerable"); + if ("writable" in desc2) { + assert_equals(desc1.writable, desc2.writable, description + " [[Writable]]"); } - if ("configurable" in descriptor) { - test(function() { - assert_equals(desc.configurable, descriptor.configurable, description + " [[Configurable]]"); - }, description + " is " + (descriptor.configurable ? "" : "not ") + " configurable"); + if ("enumerable" in desc2) { + assert_equals(desc1.enumerable, desc2.enumerable, description + " [[Enumerable]]"); } - if ("value" in descriptor) { - test(function() { - assert_equals(desc.value, descriptor.value, " [[Value]]"); - }, description + " has the expected value"); + if ("configurable" in desc2) { + assert_equals(desc1.configurable, desc2.configurable, description + " [[Configurable]]"); } } + +function assert_property(object, property, desc, description) { + assert_descriptor(Object.getOwnPropertyDescriptor(object, property), desc, description); +} + +function prototypeChain(o) { + var a = []; + do { + a.push(o); + o = Object.getPrototypeOf(o); + } while (o); + return a; +} From e189021836d661d1b09b2856e1dd9745d2327e27 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 5 May 2013 14:35:21 +1000 Subject: [PATCH 006/116] Tests for [NamedPropertiesObject]. --- .../heycam/NamedPropertiesObject-001.html | 36 +++++ .../heycam/NamedPropertiesObject-002.html | 130 ++++++++++++++++++ 2 files changed, 166 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/NamedPropertiesObject-001.html create mode 100644 WebIDL/tests/submissions/heycam/NamedPropertiesObject-002.html diff --git a/WebIDL/tests/submissions/heycam/NamedPropertiesObject-001.html b/WebIDL/tests/submissions/heycam/NamedPropertiesObject-001.html new file mode 100644 index 00000000000000..351ccdefd49597 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/NamedPropertiesObject-001.html @@ -0,0 +1,36 @@ + +[NamedPropertiesObject] prototype chain + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/NamedPropertiesObject-002.html b/WebIDL/tests/submissions/heycam/NamedPropertiesObject-002.html new file mode 100644 index 00000000000000..c968a03ed9ff1e --- /dev/null +++ b/WebIDL/tests/submissions/heycam/NamedPropertiesObject-002.html @@ -0,0 +1,130 @@ + +[NamedPropertiesObject] property lookup + + + +
+ + + + From de6410f9f983c3e1882c6eab30e104344f936874 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 5 May 2013 14:37:01 +1000 Subject: [PATCH 007/116] Add entries to manifest. --- WebIDL/tests/submissions/heycam/manifest.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index fdc6f936b98f60..6cdfc518c8b8e6 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -1,5 +1,8 @@ ArrayClass-001.html Constructor-001.html +NamedConstructor-001.html +NamedPropertiesObject-001.html +NamedPropertiesObject-002.html class-string-001.html extensible-001.html functions-001.html From 38fd3709cdd789278d322f0d6eed9195e27f8477 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 5 May 2013 15:20:32 +1000 Subject: [PATCH 008/116] Test for [NoInterfaceObject]. --- .../heycam/NoInterfaceObject-001.html | 22 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 23 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/NoInterfaceObject-001.html diff --git a/WebIDL/tests/submissions/heycam/NoInterfaceObject-001.html b/WebIDL/tests/submissions/heycam/NoInterfaceObject-001.html new file mode 100644 index 00000000000000..ca17269622ace5 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/NoInterfaceObject-001.html @@ -0,0 +1,22 @@ + +[NoInterfaceObject] + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 6cdfc518c8b8e6..f3a42b1dbd25d1 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -3,6 +3,7 @@ Constructor-001.html NamedConstructor-001.html NamedPropertiesObject-001.html NamedPropertiesObject-002.html +NoInterfaceObject-001.html class-string-001.html extensible-001.html functions-001.html From 72fc51c36ccb9d18865640d4e836bb0f701d94dc Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 5 May 2013 15:38:20 +1000 Subject: [PATCH 009/116] Fix bugs in NamedPropertiesObject-002. The named property visibility algorithm should cause expandos to shadow named properties, not the other way around. --- .../heycam/NamedPropertiesObject-002.html | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/NamedPropertiesObject-002.html b/WebIDL/tests/submissions/heycam/NamedPropertiesObject-002.html index c968a03ed9ff1e..7d07fcb7458553 100644 --- a/WebIDL/tests/submissions/heycam/NamedPropertiesObject-002.html +++ b/WebIDL/tests/submissions/heycam/NamedPropertiesObject-002.html @@ -60,15 +60,16 @@ // Define a property with the same name. Object.defineProperty(namedPropertiesObject, "f2", { writable: false, enumerable: false, configurable: true, value: "hello" }); - // Although the property definition should work, the named property should still shadow it. - assert_property(namedPropertiesObject, "f2", { writable: false, enumerable: true, configurable: true, value: iframe2.contentWindow }, "#2 namedPropertiesObject.f2"); + // The expando should now be exposed, since the named property visibility + // algorithm should prevent the named property from shadowing it. + assert_property(namedPropertiesObject, "f2", { writable: false, enumerable: false, configurable: true, value: "hello" }, "#2 namedPropertiesObject.f2"); // Remove the named property. iframe2.parentNode.removeChild(iframe2); - // The expand should now be exposed. + // The expando should still be exposed. assert_property(namedPropertiesObject, "f2", { writable: false, enumerable: false, configurable: true, value: "hello" }, "#3 namedPropertiesObject.f2"); -}, "expando properties with the same as named properties can be set, but named properties will shadow it"); +}, "expando properties with the same as named properties can be set and will shadow named properties"); test(function() { var namedPropertiesObject = Object.getPrototypeOf(Window.prototype); @@ -84,15 +85,15 @@ e.name = "f3"; hidden.appendChild(e); - // The named property should shadow the expando. - assert_property(namedPropertiesObject, "f3", { writable: false, enumerable: true, configurable: true, value: e.contentWindow }, "#2 namedPropertiesObject.f3"); + // The expando should shadow the named property. + assert_property(namedPropertiesObject, "f3", { writable: false, enumerable: false, configurable: true, value: "hello" }, "#2 namedPropertiesObject.f3"); // Remove the named property. hidden.removeChild(e); - // The expando should be revealed. + // The expando should still be visible. assert_property(namedPropertiesObject, "f3", { writable: false, enumerable: false, configurable: true, value: "hello" }, "#3 namedPropertiesObject.f3"); -}, "pre-existing expando properties are shadowed by named properties that start existing"); +}, "named properties will not shadow an existing expando property"); test(function() { var namedPropertiesObject = Object.getPrototypeOf(Window.prototype); @@ -108,13 +109,13 @@ e.name = "f4"; hidden.appendChild(e); - // The named property should shadow the expando. - assert_property(namedPropertiesObject, "f4", { writable: false, enumerable: true, configurable: true, value: e.contentWindow }, "#2 namedPropertiesObject.f4"); + // The expando should shadow the named property. + assert_property(namedPropertiesObject, "f4", { writable: false, enumerable: false, configurable: true, value: "hello" }, "#2 namedPropertiesObject.f4"); // Remove the expando. assert_true(delete namedPropertiesObject.f4, "delete namedPropertiesObject.f4"); - // The named property should still be there. + // The named property should now be visible. assert_property(namedPropertiesObject, "f4", { writable: false, enumerable: true, configurable: true, value: e.contentWindow }, "#3 namedPropertiesObject.f4"); // Remove the named property. @@ -122,7 +123,7 @@ // There shouldn't be anything there now. assert_true(!Object.getOwnPropertyDescriptor(namedPropertiesObject, "f4"), "existence of namedPropertiesObject.f4"); -}, "expando properties should be able to be removed while shadowed by a named property"); +}, "removing an expando property will reveal a shadowed named property"); // XXX We probably shouldn't allow non-configurable properties to be defined // on the named properties object: https://www.w3.org/Bugs/Public/show_bug.cgi?id=21929 From 344cb881946550c8ef9ced42034f9dd66634b0de Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 5 May 2013 17:04:20 +1000 Subject: [PATCH 010/116] Use
s instead of - +
+
+ + +
+ +
+ +
+
+
+
+
+
+
+
+
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index f3a42b1dbd25d1..96cd4d7e580832 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -3,6 +3,7 @@ Constructor-001.html NamedConstructor-001.html NamedPropertiesObject-001.html NamedPropertiesObject-002.html +NamedPropertiesObject-003.html NoInterfaceObject-001.html class-string-001.html extensible-001.html From 786a43fbe93a3502a61d490b93eae8f3fb54423d Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 5 May 2013 18:46:57 +1000 Subject: [PATCH 012/116] Tests for [OverrideBuiltins]. --- .../heycam/OverrideBuiltins-001.html | 140 ++++++++++++++++++ .../heycam/OverrideBuiltins-002.html | 107 +++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 2 + 3 files changed, 249 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/OverrideBuiltins-001.html create mode 100644 WebIDL/tests/submissions/heycam/OverrideBuiltins-002.html diff --git a/WebIDL/tests/submissions/heycam/OverrideBuiltins-001.html b/WebIDL/tests/submissions/heycam/OverrideBuiltins-001.html new file mode 100644 index 00000000000000..5825302022d9be --- /dev/null +++ b/WebIDL/tests/submissions/heycam/OverrideBuiltins-001.html @@ -0,0 +1,140 @@ + +[OverrideBuiltins] on HTMLFormElement + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/OverrideBuiltins-002.html b/WebIDL/tests/submissions/heycam/OverrideBuiltins-002.html new file mode 100644 index 00000000000000..80bed3f5c6aecd --- /dev/null +++ b/WebIDL/tests/submissions/heycam/OverrideBuiltins-002.html @@ -0,0 +1,107 @@ + +[OverrideBuiltins] on Document + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 96cd4d7e580832..a1703b3a7b4372 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -5,6 +5,8 @@ NamedPropertiesObject-001.html NamedPropertiesObject-002.html NamedPropertiesObject-003.html NoInterfaceObject-001.html +OverrideBuiltins-001.html +OverrideBuiltins-002.html class-string-001.html extensible-001.html functions-001.html From 1eac35ad0b1b3e36e2919b7aa80c565b61cd6840 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 6 May 2013 10:29:59 +1000 Subject: [PATCH 013/116] A test for [LenientThis]. --- .../submissions/heycam/LenientThis-001.html | 59 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 60 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/LenientThis-001.html diff --git a/WebIDL/tests/submissions/heycam/LenientThis-001.html b/WebIDL/tests/submissions/heycam/LenientThis-001.html new file mode 100644 index 00000000000000..12799d87ef3204 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/LenientThis-001.html @@ -0,0 +1,59 @@ + +[LenientThis] + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index a1703b3a7b4372..72ae08eb4e5149 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -1,5 +1,6 @@ ArrayClass-001.html Constructor-001.html +LenientThis-001.html NamedConstructor-001.html NamedPropertiesObject-001.html NamedPropertiesObject-002.html From 1de9a40911c47e5fd813e58427f000c1196532cd Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 6 May 2013 11:38:58 +1000 Subject: [PATCH 014/116] Test for [PutForwards]. --- .../submissions/heycam/PutForwards-001.html | 111 ++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 112 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/PutForwards-001.html diff --git a/WebIDL/tests/submissions/heycam/PutForwards-001.html b/WebIDL/tests/submissions/heycam/PutForwards-001.html new file mode 100644 index 00000000000000..1108fa868387a2 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/PutForwards-001.html @@ -0,0 +1,111 @@ + +[PutForwards] + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 72ae08eb4e5149..749fa76358c1ef 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -8,6 +8,7 @@ NamedPropertiesObject-003.html NoInterfaceObject-001.html OverrideBuiltins-001.html OverrideBuiltins-002.html +PutForwards-001.html class-string-001.html extensible-001.html functions-001.html From 6d7e539a426ccbf9526b536c0b88430b1238c4d7 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 6 May 2013 11:43:08 +1000 Subject: [PATCH 015/116] Test fixes. --- WebIDL/tests/submissions/heycam/PutForwards-001.html | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/PutForwards-001.html b/WebIDL/tests/submissions/heycam/PutForwards-001.html index 1108fa868387a2..9f70ea15e4ae36 100644 --- a/WebIDL/tests/submissions/heycam/PutForwards-001.html +++ b/WebIDL/tests/submissions/heycam/PutForwards-001.html @@ -41,15 +41,6 @@ iframe.contentDocument.location = newHref; }, "Document.location assignment forwards property assignment"); -test(function() { - var iframe = document.getElementById("iframe"); - var desc = Object.getOwnPropertyDescriptor(iframe.contentWindow.Document.prototype, "location"); - assert_true(!!desc, "!!desc"); - assert_throws({ name: "TypeError" }, function() { - desc.set.call(iframe.contentDocument); - }); -}, "Document.location assignment throws TypeError when called with no arguments"); - test(function() { var desc = Object.getOwnPropertyDescriptor(HTMLElement.prototype, "style"); assert_true(!!desc, "!!desc"); @@ -63,7 +54,7 @@ }, "HTMLElement.prototype.style setter has correct length property"); test(function() { - var e = document.getElementById("span"); + var e = document.getElementById("span1"); e.style.color = "red"; assert_equals(e.style.color, "red"); From ab784052463657c84443b5353e9554a867c05ba8 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 6 May 2013 12:08:44 +1000 Subject: [PATCH 016/116] Test for [Replaceable]. --- .../submissions/heycam/Replaceable-001.html | 61 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 62 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/Replaceable-001.html diff --git a/WebIDL/tests/submissions/heycam/Replaceable-001.html b/WebIDL/tests/submissions/heycam/Replaceable-001.html new file mode 100644 index 00000000000000..2e57392425c04a --- /dev/null +++ b/WebIDL/tests/submissions/heycam/Replaceable-001.html @@ -0,0 +1,61 @@ + +[Replaceable] + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 749fa76358c1ef..022b4c0d775bd0 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -9,6 +9,7 @@ NoInterfaceObject-001.html OverrideBuiltins-001.html OverrideBuiltins-002.html PutForwards-001.html +Replaceable-001.html class-string-001.html extensible-001.html functions-001.html From 5b23c68cbf5bcaed2fcd47006d2bef4120f43951 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 6 May 2013 12:24:43 +1000 Subject: [PATCH 017/116] Test for [TreatNullAs]. --- .../submissions/heycam/TreatNullAs-001.html | 37 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 38 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/TreatNullAs-001.html diff --git a/WebIDL/tests/submissions/heycam/TreatNullAs-001.html b/WebIDL/tests/submissions/heycam/TreatNullAs-001.html new file mode 100644 index 00000000000000..1fdaede6a6f397 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/TreatNullAs-001.html @@ -0,0 +1,37 @@ + +[TreatNullAs] on attributes + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 022b4c0d775bd0..537a95523120f0 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -10,6 +10,7 @@ OverrideBuiltins-001.html OverrideBuiltins-002.html PutForwards-001.html Replaceable-001.html +TreatNullAs-001.html class-string-001.html extensible-001.html functions-001.html From 9f96e65a8990db59fea36241f1f1b8f24e80a9ab Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 6 May 2013 13:31:51 +1000 Subject: [PATCH 018/116] Test for [Unforgeable]. --- .../submissions/heycam/Unforgeable-001.html | 22 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 23 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/Unforgeable-001.html diff --git a/WebIDL/tests/submissions/heycam/Unforgeable-001.html b/WebIDL/tests/submissions/heycam/Unforgeable-001.html new file mode 100644 index 00000000000000..0fdea52b2cde57 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/Unforgeable-001.html @@ -0,0 +1,22 @@ + +[Unforgeable] on attributes + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 537a95523120f0..e763979e374a72 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -11,6 +11,7 @@ OverrideBuiltins-002.html PutForwards-001.html Replaceable-001.html TreatNullAs-001.html +Unforgeable-001.html class-string-001.html extensible-001.html functions-001.html From 649663eca88884d07872f961f589336f56d00d92 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 6 May 2013 13:51:41 +1000 Subject: [PATCH 019/116] Test for [Clamp]. --- .../tests/submissions/heycam/Clamp-001.html | 51 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 52 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/Clamp-001.html diff --git a/WebIDL/tests/submissions/heycam/Clamp-001.html b/WebIDL/tests/submissions/heycam/Clamp-001.html new file mode 100644 index 00000000000000..745bcf0282d961 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/Clamp-001.html @@ -0,0 +1,51 @@ + +[Clamp] on operation arguments + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index e763979e374a72..1bdfadeac8eab8 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -1,4 +1,5 @@ ArrayClass-001.html +Clamp-001.html Constructor-001.html LenientThis-001.html NamedConstructor-001.html From bcf2febbf14e08d789e844293e9cf63426ed8ad0 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 6 May 2013 14:10:22 +1000 Subject: [PATCH 020/116] Typo fix. --- WebIDL/tests/submissions/heycam/TreatNullAs-001.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebIDL/tests/submissions/heycam/TreatNullAs-001.html b/WebIDL/tests/submissions/heycam/TreatNullAs-001.html index 1fdaede6a6f397..8b560b66c21ba3 100644 --- a/WebIDL/tests/submissions/heycam/TreatNullAs-001.html +++ b/WebIDL/tests/submissions/heycam/TreatNullAs-001.html @@ -9,7 +9,7 @@ // 4.2.16 DOMString // // Assigning to an attribute of type DOMString will by default convert null to -// "null". If [TreatNullAs=EmptyString] in on the attribute, null will be +// "null". If [TreatNullAs=EmptyString] is on the attribute, null will be // converted to "" instead. test(function() { From 3554ba2cdf9918c530ba918c333c15db32037948 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 6 May 2013 14:38:20 +1000 Subject: [PATCH 021/116] Test for [TreatNullAs] on an operation argument. --- .../submissions/heycam/TreatNullAs-002.html | 24 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 25 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/TreatNullAs-002.html diff --git a/WebIDL/tests/submissions/heycam/TreatNullAs-002.html b/WebIDL/tests/submissions/heycam/TreatNullAs-002.html new file mode 100644 index 00000000000000..7e9696ec97267e --- /dev/null +++ b/WebIDL/tests/submissions/heycam/TreatNullAs-002.html @@ -0,0 +1,24 @@ + +[TreatNullAs] on operation arguments + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 1bdfadeac8eab8..b8d90b5f5bc0b1 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -12,6 +12,7 @@ OverrideBuiltins-002.html PutForwards-001.html Replaceable-001.html TreatNullAs-001.html +TreatNullAs-002.html Unforgeable-001.html class-string-001.html extensible-001.html From afc90dd4ddb0221fdf1ced7af37ded4f04e6eef3 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 6 May 2013 14:38:33 +1000 Subject: [PATCH 022/116] Test for [TreatNonCallableAsNull]. --- .../heycam/TreatNonCallableAsNull-001.html | 39 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 40 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/TreatNonCallableAsNull-001.html diff --git a/WebIDL/tests/submissions/heycam/TreatNonCallableAsNull-001.html b/WebIDL/tests/submissions/heycam/TreatNonCallableAsNull-001.html new file mode 100644 index 00000000000000..60562fb7bc2e44 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/TreatNonCallableAsNull-001.html @@ -0,0 +1,39 @@ + +[TreatNonCallableAsNull] + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index b8d90b5f5bc0b1..60bdc3fca502f7 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -11,6 +11,7 @@ OverrideBuiltins-001.html OverrideBuiltins-002.html PutForwards-001.html Replaceable-001.html +TreatNonCallableAsNull-001.html TreatNullAs-001.html TreatNullAs-002.html Unforgeable-001.html From 986a5a229c0d81597f19042bd564696cb3dac298 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 6 May 2013 14:57:45 +1000 Subject: [PATCH 023/116] Test for void return type. --- WebIDL/tests/submissions/heycam/manifest.txt | 1 + WebIDL/tests/submissions/heycam/void-001.html | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/void-001.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 60bdc3fca502f7..06e5d9fa74f91e 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -20,3 +20,4 @@ extensible-001.html functions-001.html initial-001.html initial-002.html +void-001.html diff --git a/WebIDL/tests/submissions/heycam/void-001.html b/WebIDL/tests/submissions/heycam/void-001.html new file mode 100644 index 00000000000000..cbf09488155b84 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/void-001.html @@ -0,0 +1,20 @@ + +void + + + +
+ + From 635afe209ae4ee7059ecdd664d2b6ed2177c5ee4 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 6 May 2013 15:30:58 +1000 Subject: [PATCH 024/116] Tweak comment. --- WebIDL/tests/submissions/heycam/void-001.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebIDL/tests/submissions/heycam/void-001.html b/WebIDL/tests/submissions/heycam/void-001.html index cbf09488155b84..1c4b222e4f1662 100644 --- a/WebIDL/tests/submissions/heycam/void-001.html +++ b/WebIDL/tests/submissions/heycam/void-001.html @@ -6,7 +6,7 @@
+ + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 06e5d9fa74f91e..849103f4f7483d 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -15,6 +15,7 @@ TreatNonCallableAsNull-001.html TreatNullAs-001.html TreatNullAs-002.html Unforgeable-001.html +any-001.html class-string-001.html extensible-001.html functions-001.html From 298850732b67d68c498243cccdd6721be6e8b16c Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 6 May 2013 16:42:20 +1000 Subject: [PATCH 026/116] Add test for boolean. --- .../tests/submissions/heycam/boolean-001.html | 45 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 46 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/boolean-001.html diff --git a/WebIDL/tests/submissions/heycam/boolean-001.html b/WebIDL/tests/submissions/heycam/boolean-001.html new file mode 100644 index 00000000000000..4fc46469c7c898 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/boolean-001.html @@ -0,0 +1,45 @@ + +boolean + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 849103f4f7483d..2337f3b31d2050 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -16,6 +16,7 @@ TreatNullAs-001.html TreatNullAs-002.html Unforgeable-001.html any-001.html +boolean-001.html class-string-001.html extensible-001.html functions-001.html From ff5c57a99a90f5e8931456890c5e6189574774ce Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 6 May 2013 16:42:29 +1000 Subject: [PATCH 027/116] Add test for byte. --- WebIDL/tests/submissions/heycam/byte-001.html | 90 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 91 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/byte-001.html diff --git a/WebIDL/tests/submissions/heycam/byte-001.html b/WebIDL/tests/submissions/heycam/byte-001.html new file mode 100644 index 00000000000000..5e418b8ae31725 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/byte-001.html @@ -0,0 +1,90 @@ + +byte + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 2337f3b31d2050..3a9293a3d0376c 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -17,6 +17,7 @@ TreatNullAs-002.html Unforgeable-001.html any-001.html boolean-001.html +byte-001.html class-string-001.html extensible-001.html functions-001.html From e1ec1916f1d5ee0881ce9a5eedb077d611bc2676 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 6 May 2013 17:04:39 +1000 Subject: [PATCH 028/116] Comment tweak. --- WebIDL/tests/submissions/heycam/byte-001.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebIDL/tests/submissions/heycam/byte-001.html b/WebIDL/tests/submissions/heycam/byte-001.html index 5e418b8ae31725..7b928dc7d701a9 100644 --- a/WebIDL/tests/submissions/heycam/byte-001.html +++ b/WebIDL/tests/submissions/heycam/byte-001.html @@ -9,7 +9,7 @@ // 4.2.4 byte // // Converting a JS value to an IDL byte performs a similar operation to -// ECMAScript's ToUint32, but for an 8 bit result. +// ECMAScript's ToInt32, but for an 8 bit result. var values = [ undefined, 0, "undefined", From 19140ef5ae114e8375566fdf90bd1edd60fbd6c0 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 6 May 2013 17:10:09 +1000 Subject: [PATCH 029/116] Test for octet. --- WebIDL/tests/submissions/heycam/manifest.txt | 1 + .../tests/submissions/heycam/octet-001.html | 90 +++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/octet-001.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 3a9293a3d0376c..26895859d7de36 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -23,4 +23,5 @@ extensible-001.html functions-001.html initial-001.html initial-002.html +octet-001.html void-001.html diff --git a/WebIDL/tests/submissions/heycam/octet-001.html b/WebIDL/tests/submissions/heycam/octet-001.html new file mode 100644 index 00000000000000..d4ac01596007c5 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/octet-001.html @@ -0,0 +1,90 @@ + +octet + + + +
+ + From dc4b916c8452f58b3d34205906bb71a1168e8cfb Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Tue, 7 May 2013 09:05:03 +1000 Subject: [PATCH 030/116] Test for short. --- WebIDL/tests/submissions/heycam/manifest.txt | 1 + .../tests/submissions/heycam/short-001.html | 90 +++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/short-001.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 26895859d7de36..2975e692065555 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -24,4 +24,5 @@ functions-001.html initial-001.html initial-002.html octet-001.html +short-001.html void-001.html diff --git a/WebIDL/tests/submissions/heycam/short-001.html b/WebIDL/tests/submissions/heycam/short-001.html new file mode 100644 index 00000000000000..7010f7935b16fa --- /dev/null +++ b/WebIDL/tests/submissions/heycam/short-001.html @@ -0,0 +1,90 @@ + +short + + + +
+ + From 9b0261169b9b56084b2d5ebb3fa139baaec25f1d Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Tue, 7 May 2013 11:01:41 +1000 Subject: [PATCH 031/116] Tests for unsigned short. --- WebIDL/tests/submissions/heycam/manifest.txt | 2 + .../heycam/unsigned-short-001.html | 88 ++++++++++ .../heycam/unsigned-short-002.html | 151 ++++++++++++++++++ 3 files changed, 241 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/unsigned-short-001.html create mode 100644 WebIDL/tests/submissions/heycam/unsigned-short-002.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 2975e692065555..ef8eef8a8adb53 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -25,4 +25,6 @@ initial-001.html initial-002.html octet-001.html short-001.html +unsigned-short-001.html +unsigned-short-002.html void-001.html diff --git a/WebIDL/tests/submissions/heycam/unsigned-short-001.html b/WebIDL/tests/submissions/heycam/unsigned-short-001.html new file mode 100644 index 00000000000000..c968f59fa62bcb --- /dev/null +++ b/WebIDL/tests/submissions/heycam/unsigned-short-001.html @@ -0,0 +1,88 @@ + +unsigned short + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/unsigned-short-002.html b/WebIDL/tests/submissions/heycam/unsigned-short-002.html new file mode 100644 index 00000000000000..8aed46142c561a --- /dev/null +++ b/WebIDL/tests/submissions/heycam/unsigned-short-002.html @@ -0,0 +1,151 @@ + +unsigned short + + + +
+ + + + From 3a766fbd396ece97945ba9b62d4b5003d2c1a43e Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Tue, 7 May 2013 12:21:50 +1000 Subject: [PATCH 032/116] Fix spec section number in comments. --- WebIDL/tests/submissions/heycam/short-001.html | 2 +- WebIDL/tests/submissions/heycam/unsigned-short-001.html | 2 +- WebIDL/tests/submissions/heycam/unsigned-short-002.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/short-001.html b/WebIDL/tests/submissions/heycam/short-001.html index 7010f7935b16fa..12a8f9049c174a 100644 --- a/WebIDL/tests/submissions/heycam/short-001.html +++ b/WebIDL/tests/submissions/heycam/short-001.html @@ -6,7 +6,7 @@
+ + +
+ + diff --git a/WebIDL/tests/submissions/heycam/long-002.html b/WebIDL/tests/submissions/heycam/long-002.html new file mode 100644 index 00000000000000..219f60802e8518 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/long-002.html @@ -0,0 +1,89 @@ + +long + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index ef8eef8a8adb53..3dad429e62574a 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -23,6 +23,8 @@ extensible-001.html functions-001.html initial-001.html initial-002.html +long-001.html +long-002.html octet-001.html short-001.html unsigned-short-001.html From 82d9dd28db497589097fa606c2bb9b57bca8ddc8 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Tue, 7 May 2013 13:46:31 +1000 Subject: [PATCH 034/116] Add tests for unsigned long. --- WebIDL/tests/submissions/heycam/manifest.txt | 2 + .../submissions/heycam/unsigned-long-001.html | 89 +++++++++++++++++++ .../submissions/heycam/unsigned-long-002.html | 89 +++++++++++++++++++ 3 files changed, 180 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/unsigned-long-001.html create mode 100644 WebIDL/tests/submissions/heycam/unsigned-long-002.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 3dad429e62574a..896a83f60c6b2b 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -27,6 +27,8 @@ long-001.html long-002.html octet-001.html short-001.html +unsigned-long-001.html +unsigned-long-002.html unsigned-short-001.html unsigned-short-002.html void-001.html diff --git a/WebIDL/tests/submissions/heycam/unsigned-long-001.html b/WebIDL/tests/submissions/heycam/unsigned-long-001.html new file mode 100644 index 00000000000000..a26c565a4bd87f --- /dev/null +++ b/WebIDL/tests/submissions/heycam/unsigned-long-001.html @@ -0,0 +1,89 @@ + +unsigned long + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/unsigned-long-002.html b/WebIDL/tests/submissions/heycam/unsigned-long-002.html new file mode 100644 index 00000000000000..ae341b02eb4d5e --- /dev/null +++ b/WebIDL/tests/submissions/heycam/unsigned-long-002.html @@ -0,0 +1,89 @@ + +unsigned long + + + +
+ + From 249954076f9d4ccac55344a4069a595ac221f265 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Tue, 7 May 2013 17:14:35 +1000 Subject: [PATCH 035/116] Tests for float. --- .../tests/submissions/heycam/float-001.html | 108 ++++++++++++++++++ .../tests/submissions/heycam/float-002.html | 108 ++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 2 + 3 files changed, 218 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/float-001.html create mode 100644 WebIDL/tests/submissions/heycam/float-002.html diff --git a/WebIDL/tests/submissions/heycam/float-001.html b/WebIDL/tests/submissions/heycam/float-001.html new file mode 100644 index 00000000000000..407ede9ac1bd0a --- /dev/null +++ b/WebIDL/tests/submissions/heycam/float-001.html @@ -0,0 +1,108 @@ + +float + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/float-002.html b/WebIDL/tests/submissions/heycam/float-002.html new file mode 100644 index 00000000000000..b1acc1f4139ed3 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/float-002.html @@ -0,0 +1,108 @@ + +float + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 896a83f60c6b2b..7ad394773e7437 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -20,6 +20,8 @@ boolean-001.html byte-001.html class-string-001.html extensible-001.html +float-001.html +float-002.html functions-001.html initial-001.html initial-002.html From 8066f7aac23889b40be7ac09636123fb28a383d6 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Wed, 8 May 2013 10:41:51 +1000 Subject: [PATCH 036/116] Test for unrestricted float. --- WebIDL/tests/submissions/heycam/manifest.txt | 1 + .../heycam/unrestricted-float-001.html | 94 +++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/unrestricted-float-001.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 7ad394773e7437..5b1d390f156b69 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -29,6 +29,7 @@ long-001.html long-002.html octet-001.html short-001.html +unrestricted-float-001.html unsigned-long-001.html unsigned-long-002.html unsigned-short-001.html diff --git a/WebIDL/tests/submissions/heycam/unrestricted-float-001.html b/WebIDL/tests/submissions/heycam/unrestricted-float-001.html new file mode 100644 index 00000000000000..38cc336965234f --- /dev/null +++ b/WebIDL/tests/submissions/heycam/unrestricted-float-001.html @@ -0,0 +1,94 @@ + +unrestricted float + + + +
+ + From 84dde23d45976cde604dcad12ce58e1204054f59 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Wed, 8 May 2013 12:08:49 +1000 Subject: [PATCH 037/116] Tests for double. --- .../tests/submissions/heycam/double-001.html | 105 ++++++++++++++++++ .../tests/submissions/heycam/double-002.html | 105 ++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 2 + 3 files changed, 212 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/double-001.html create mode 100644 WebIDL/tests/submissions/heycam/double-002.html diff --git a/WebIDL/tests/submissions/heycam/double-001.html b/WebIDL/tests/submissions/heycam/double-001.html new file mode 100644 index 00000000000000..ec9745650dae8b --- /dev/null +++ b/WebIDL/tests/submissions/heycam/double-001.html @@ -0,0 +1,105 @@ + +double + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/double-002.html b/WebIDL/tests/submissions/heycam/double-002.html new file mode 100644 index 00000000000000..cc8e117ec3fa69 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/double-002.html @@ -0,0 +1,105 @@ + +double + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 5b1d390f156b69..a59642ea2bb338 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -19,6 +19,8 @@ any-001.html boolean-001.html byte-001.html class-string-001.html +double-001.html +double-002.html extensible-001.html float-001.html float-002.html From 96605bf2a74f4c7f28bbb5b12eaef5a8fff234d5 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Wed, 8 May 2013 12:22:06 +1000 Subject: [PATCH 038/116] Assertion text typos. --- WebIDL/tests/submissions/heycam/unrestricted-float-001.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/unrestricted-float-001.html b/WebIDL/tests/submissions/heycam/unrestricted-float-001.html index 38cc336965234f..af80709f09b6bb 100644 --- a/WebIDL/tests/submissions/heycam/unrestricted-float-001.html +++ b/WebIDL/tests/submissions/heycam/unrestricted-float-001.html @@ -53,7 +53,7 @@ test(function() { a[0] = value; assert_equals(a[0], expected); - }, "passing " + desc + " through an Float32Array indexed property setter coerces the value to an IDL unrestricted float correctly"); + }, "passing " + desc + " through a Float32Array indexed property setter coerces the value to an IDL unrestricted float correctly"); } for (var i = 0; i < values.length; i += 3) { @@ -69,7 +69,7 @@ // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. assert_throws({ name: "TypeError" }, function() { a[0] = objectValue; }); } - }, "passing { valueOf: function() { return " + desc + " } } through an Float32Array indexed property setter coerces the value to an IDL unrestricted float correctly"); + }, "passing { valueOf: function() { return " + desc + " } } through a Float32Array indexed property setter coerces the value to an IDL unrestricted float correctly"); } for (var i = 0; i < values.length; i += 3) { @@ -85,7 +85,7 @@ // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. assert_throws({ name: "TypeError" }, function() { a[0] = objectValue; }); } - }, "passing { toString: function() { return " + desc + " } } through an Float32Array indexed property setter coerces the value to an IDL unrestricted float correctly"); + }, "passing { toString: function() { return " + desc + " } } through a Float32Array indexed property setter coerces the value to an IDL unrestricted float correctly"); } test(function() { From 0fe989c4905565b5ea2e0fbfcd4cdb7c9fee980a Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Wed, 8 May 2013 12:43:22 +1000 Subject: [PATCH 039/116] Tests for unrestricted double. --- WebIDL/tests/submissions/heycam/manifest.txt | 3 + .../heycam/unrestricted-double-001.html | 104 ++++++++++++++++++ .../heycam/unrestricted-double-002.html | 94 ++++++++++++++++ .../heycam/unrestricted-double-003.html | 36 ++++++ 4 files changed, 237 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/unrestricted-double-001.html create mode 100644 WebIDL/tests/submissions/heycam/unrestricted-double-002.html create mode 100644 WebIDL/tests/submissions/heycam/unrestricted-double-003.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index a59642ea2bb338..dcd992600db74b 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -32,6 +32,9 @@ long-002.html octet-001.html short-001.html unrestricted-float-001.html +unrestricted-double-001.html +unrestricted-double-002.html +unrestricted-double-003.html unsigned-long-001.html unsigned-long-002.html unsigned-short-001.html diff --git a/WebIDL/tests/submissions/heycam/unrestricted-double-001.html b/WebIDL/tests/submissions/heycam/unrestricted-double-001.html new file mode 100644 index 00000000000000..dfd6e18ebb021b --- /dev/null +++ b/WebIDL/tests/submissions/heycam/unrestricted-double-001.html @@ -0,0 +1,104 @@ + +unrestricted double + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/unrestricted-double-002.html b/WebIDL/tests/submissions/heycam/unrestricted-double-002.html new file mode 100644 index 00000000000000..cd5299615b6f6d --- /dev/null +++ b/WebIDL/tests/submissions/heycam/unrestricted-double-002.html @@ -0,0 +1,94 @@ + +unrestricted double + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/unrestricted-double-003.html b/WebIDL/tests/submissions/heycam/unrestricted-double-003.html new file mode 100644 index 00000000000000..a0de966bde6ec0 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/unrestricted-double-003.html @@ -0,0 +1,36 @@ + +unrestricted doubles must canonicalize NaN + + + +
+ + From eda1c492e2b368fdea14195958aef9829271180f Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Wed, 8 May 2013 14:55:42 +1000 Subject: [PATCH 040/116] Add tests for DOMString. --- .../submissions/heycam/DOMString-001.html | 103 +++++++++++++++++ .../submissions/heycam/DOMString-002.html | 106 ++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 2 + 3 files changed, 211 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/DOMString-001.html create mode 100644 WebIDL/tests/submissions/heycam/DOMString-002.html diff --git a/WebIDL/tests/submissions/heycam/DOMString-001.html b/WebIDL/tests/submissions/heycam/DOMString-001.html new file mode 100644 index 00000000000000..9cde87e51ef6a9 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/DOMString-001.html @@ -0,0 +1,103 @@ + +DOMString + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/DOMString-002.html b/WebIDL/tests/submissions/heycam/DOMString-002.html new file mode 100644 index 00000000000000..590410da30f662 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/DOMString-002.html @@ -0,0 +1,106 @@ + +DOMString + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index dcd992600db74b..36853e9f29013c 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -1,6 +1,8 @@ ArrayClass-001.html Clamp-001.html Constructor-001.html +DOMString-001.html +DOMString-002.html LenientThis-001.html NamedConstructor-001.html NamedPropertiesObject-001.html From 642f753ec87caa4798ec62d0c0ae1bca506314f5 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Wed, 8 May 2013 15:39:54 +1000 Subject: [PATCH 041/116] Test for object. --- WebIDL/tests/submissions/heycam/manifest.txt | 1 + .../tests/submissions/heycam/object-001.html | 47 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/object-001.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 36853e9f29013c..38837aef7714a1 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -31,6 +31,7 @@ initial-001.html initial-002.html long-001.html long-002.html +object-001.html octet-001.html short-001.html unrestricted-float-001.html diff --git a/WebIDL/tests/submissions/heycam/object-001.html b/WebIDL/tests/submissions/heycam/object-001.html new file mode 100644 index 00000000000000..d184b50b6a9422 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/object-001.html @@ -0,0 +1,47 @@ + +object + + + +
+ + From b0f3023a6886fd48f848ea1b08120470e95dd08a Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Wed, 8 May 2013 17:08:46 +1000 Subject: [PATCH 042/116] Add tests for interface types. --- .../heycam/interface-type-001.html | 67 +++++++ .../heycam/interface-type-002.html | 67 +++++++ .../heycam/interface-type-003.html | 163 ++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 3 + 4 files changed, 300 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/interface-type-001.html create mode 100644 WebIDL/tests/submissions/heycam/interface-type-002.html create mode 100644 WebIDL/tests/submissions/heycam/interface-type-003.html diff --git a/WebIDL/tests/submissions/heycam/interface-type-001.html b/WebIDL/tests/submissions/heycam/interface-type-001.html new file mode 100644 index 00000000000000..c59fe5e6d73930 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/interface-type-001.html @@ -0,0 +1,67 @@ + +Interface types for regular interfaces + + + +
+ + + + + diff --git a/WebIDL/tests/submissions/heycam/interface-type-002.html b/WebIDL/tests/submissions/heycam/interface-type-002.html new file mode 100644 index 00000000000000..4f7d545faacc1f --- /dev/null +++ b/WebIDL/tests/submissions/heycam/interface-type-002.html @@ -0,0 +1,67 @@ + +Interface types for regular interfaces + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/interface-type-003.html b/WebIDL/tests/submissions/heycam/interface-type-003.html new file mode 100644 index 00000000000000..8b3a0b4e1f4b59 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/interface-type-003.html @@ -0,0 +1,163 @@ + +Interface types for callback interfaces + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 38837aef7714a1..9db0542ab5faf1 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -29,6 +29,9 @@ float-002.html functions-001.html initial-001.html initial-002.html +interface-type-001.html +interface-type-002.html +interface-type-003.html long-001.html long-002.html object-001.html From 642824180db69a8b7f8cb82c806abe8041817a95 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Wed, 8 May 2013 20:49:26 +1000 Subject: [PATCH 043/116] Add test for dictionary types. --- .../heycam/dictionary-type-001.html | 142 ++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 143 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/dictionary-type-001.html diff --git a/WebIDL/tests/submissions/heycam/dictionary-type-001.html b/WebIDL/tests/submissions/heycam/dictionary-type-001.html new file mode 100644 index 00000000000000..3e2c98c6528e8f --- /dev/null +++ b/WebIDL/tests/submissions/heycam/dictionary-type-001.html @@ -0,0 +1,142 @@ + +Dictionary types + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 9db0542ab5faf1..0ffc63f21260a9 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -21,6 +21,7 @@ any-001.html boolean-001.html byte-001.html class-string-001.html +dictionary-type-001.html double-001.html double-002.html extensible-001.html From f72443ee1e697a781f32f795bac5e69fafb4be05 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Thu, 9 May 2013 08:05:26 +1000 Subject: [PATCH 044/116] Test for enumeration types. --- .../submissions/heycam/enum-type-001.html | 61 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 62 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/enum-type-001.html diff --git a/WebIDL/tests/submissions/heycam/enum-type-001.html b/WebIDL/tests/submissions/heycam/enum-type-001.html new file mode 100644 index 00000000000000..530899c00fafaa --- /dev/null +++ b/WebIDL/tests/submissions/heycam/enum-type-001.html @@ -0,0 +1,61 @@ + +Enumeration types + + + +
+ +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 0ffc63f21260a9..684de0802e4c89 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -24,6 +24,7 @@ class-string-001.html dictionary-type-001.html double-001.html double-002.html +enum-type-001.html extensible-001.html float-001.html float-002.html From 6769487dea38a23dbb877a6f3341774bc30cbcaa Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Thu, 9 May 2013 08:05:37 +1000 Subject: [PATCH 045/116] Test for callback function types. --- .../heycam/callback-function-type-001.html | 54 +++++++++++++++++++ .../heycam/callback-function-type-002.html | 52 ++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 2 + 3 files changed, 108 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/callback-function-type-001.html create mode 100644 WebIDL/tests/submissions/heycam/callback-function-type-002.html diff --git a/WebIDL/tests/submissions/heycam/callback-function-type-001.html b/WebIDL/tests/submissions/heycam/callback-function-type-001.html new file mode 100644 index 00000000000000..64328822c111d6 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/callback-function-type-001.html @@ -0,0 +1,54 @@ + +Callback function types + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/callback-function-type-002.html b/WebIDL/tests/submissions/heycam/callback-function-type-002.html new file mode 100644 index 00000000000000..7df87c8a1398c4 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/callback-function-type-002.html @@ -0,0 +1,52 @@ + +Callback function types + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 684de0802e4c89..b10a900ae306d4 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -20,6 +20,8 @@ Unforgeable-001.html any-001.html boolean-001.html byte-001.html +callback-function-type-001.html +callback-function-type-002.html class-string-001.html dictionary-type-001.html double-001.html From d78c8acdf1391dda4cc4717b3a23504ce83ad15d Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Thu, 9 May 2013 09:34:21 +1000 Subject: [PATCH 046/116] Tests for nullable types. --- WebIDL/tests/submissions/heycam/manifest.txt | 2 + .../submissions/heycam/nullable-001.html | 74 ++++++++++++++++ .../submissions/heycam/nullable-002.html | 88 +++++++++++++++++++ 3 files changed, 164 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/nullable-001.html create mode 100644 WebIDL/tests/submissions/heycam/nullable-002.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index b10a900ae306d4..21c4630c7bb765 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -38,6 +38,8 @@ interface-type-002.html interface-type-003.html long-001.html long-002.html +nullable-001.html +nullable-002.html object-001.html octet-001.html short-001.html diff --git a/WebIDL/tests/submissions/heycam/nullable-001.html b/WebIDL/tests/submissions/heycam/nullable-001.html new file mode 100644 index 00000000000000..c115eeb2c3b9fe --- /dev/null +++ b/WebIDL/tests/submissions/heycam/nullable-001.html @@ -0,0 +1,74 @@ + +Nullable types + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/nullable-002.html b/WebIDL/tests/submissions/heycam/nullable-002.html new file mode 100644 index 00000000000000..c24ff9152482fb --- /dev/null +++ b/WebIDL/tests/submissions/heycam/nullable-002.html @@ -0,0 +1,88 @@ + +Nullable types + + + +
+ + From 233eb4cbd774b6b9f39eb1c854218c78358a29af Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Thu, 9 May 2013 12:03:21 +1000 Subject: [PATCH 047/116] Test for sequence types. --- WebIDL/tests/submissions/heycam/manifest.txt | 1 + .../submissions/heycam/sequence-001.html | 113 ++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/sequence-001.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 21c4630c7bb765..afd45090ea4746 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -42,6 +42,7 @@ nullable-001.html nullable-002.html object-001.html octet-001.html +sequence-001.html short-001.html unrestricted-float-001.html unrestricted-double-001.html diff --git a/WebIDL/tests/submissions/heycam/sequence-001.html b/WebIDL/tests/submissions/heycam/sequence-001.html new file mode 100644 index 00000000000000..1ffa5ac51d9fef --- /dev/null +++ b/WebIDL/tests/submissions/heycam/sequence-001.html @@ -0,0 +1,113 @@ + +Sequence types + + + +
+ + From ce5adffa13290b20ed7993648e3113c2e5195307 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Thu, 9 May 2013 12:06:12 +1000 Subject: [PATCH 048/116] Test for union types. --- WebIDL/tests/submissions/heycam/manifest.txt | 1 + .../tests/submissions/heycam/union-001.html | 102 ++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/union-001.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index afd45090ea4746..571b8306a32b7e 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -44,6 +44,7 @@ object-001.html octet-001.html sequence-001.html short-001.html +union-001.html unrestricted-float-001.html unrestricted-double-001.html unrestricted-double-002.html diff --git a/WebIDL/tests/submissions/heycam/union-001.html b/WebIDL/tests/submissions/heycam/union-001.html new file mode 100644 index 00000000000000..9f28599fcdc805 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/union-001.html @@ -0,0 +1,102 @@ + +Union types + + + +
+ + From 4b1c515fd9b1d5d9f635738026770d7394ca8ead Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Thu, 9 May 2013 12:28:13 +1000 Subject: [PATCH 049/116] Test for Date. --- WebIDL/tests/submissions/heycam/Date-001.html | 81 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 82 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/Date-001.html diff --git a/WebIDL/tests/submissions/heycam/Date-001.html b/WebIDL/tests/submissions/heycam/Date-001.html new file mode 100644 index 00000000000000..0c921705cffc5c --- /dev/null +++ b/WebIDL/tests/submissions/heycam/Date-001.html @@ -0,0 +1,81 @@ + +Date + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 571b8306a32b7e..b4a90e4e89ce4c 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -1,6 +1,7 @@ ArrayClass-001.html Clamp-001.html Constructor-001.html +Date-001.html DOMString-001.html DOMString-002.html LenientThis-001.html From e024e130dc98d7dda8492b3f51cfe63272e666b0 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Thu, 9 May 2013 13:48:44 +1000 Subject: [PATCH 050/116] Test that interface objects are function objects. --- WebIDL/tests/submissions/heycam/functions-001.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/WebIDL/tests/submissions/heycam/functions-001.html b/WebIDL/tests/submissions/heycam/functions-001.html index f54aaaf9201408..c47da1f7bf4b1d 100644 --- a/WebIDL/tests/submissions/heycam/functions-001.html +++ b/WebIDL/tests/submissions/heycam/functions-001.html @@ -14,6 +14,14 @@ var objects = [ + // interface object + interfaceObject("DOMImplementation"), "DOMImplementation interface object", + interfaceObject("HTMLCollection"), "HTMLCollection interface object", + interfaceObject("Element"), "Element interface object", + interfaceObject("UIEvent"), "UIEvent interface object", + interfaceObject("Event"), "Event interface object", + interfaceObject("XMLHttpRequest"), "XMLHttpRequest interface object", + // named constructor object namedConstructorObject("Image"), "Image named constructor object", namedConstructorObject("Audio"), "Audio named constructor object", From 61918968213511347c785d65a4c3e71a799aabb4 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Thu, 9 May 2013 14:08:13 +1000 Subject: [PATCH 051/116] Some tests for interface objects. --- .../submissions/heycam/interface-001.html | 22 +++++++++++ .../heycam/interface-object-001.html | 38 +++++++++++++++++++ .../heycam/interface-object-002.html | 26 +++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 3 ++ 4 files changed, 89 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/interface-001.html create mode 100644 WebIDL/tests/submissions/heycam/interface-object-001.html create mode 100644 WebIDL/tests/submissions/heycam/interface-object-002.html diff --git a/WebIDL/tests/submissions/heycam/interface-001.html b/WebIDL/tests/submissions/heycam/interface-001.html new file mode 100644 index 00000000000000..160745c9f3336a --- /dev/null +++ b/WebIDL/tests/submissions/heycam/interface-001.html @@ -0,0 +1,22 @@ + +Interface object property + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/interface-object-001.html b/WebIDL/tests/submissions/heycam/interface-object-001.html new file mode 100644 index 00000000000000..24f3bd3059837b --- /dev/null +++ b/WebIDL/tests/submissions/heycam/interface-object-001.html @@ -0,0 +1,38 @@ + +Interface object property + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/interface-object-002.html b/WebIDL/tests/submissions/heycam/interface-object-002.html new file mode 100644 index 00000000000000..3eb00948802420 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/interface-object-002.html @@ -0,0 +1,26 @@ + +Interface object property for a callback interface + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index b4a90e4e89ce4c..19401dc944f08b 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -34,6 +34,9 @@ float-002.html functions-001.html initial-001.html initial-002.html +interface-001.html +interface-object-001.html +interface-object-002.html interface-type-001.html interface-type-002.html interface-type-003.html From 8a40a5039f2208c613a020194b5ed489b1fdec3f Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Thu, 9 May 2013 16:41:03 +1000 Subject: [PATCH 052/116] Add tests for IDL -> JS type conversions. --- .../submissions/heycam/DOMString-003.html | 23 +++++++++++++ WebIDL/tests/submissions/heycam/Date-002.html | 22 +++++++++++++ .../tests/submissions/heycam/boolean-002.html | 21 ++++++++++++ WebIDL/tests/submissions/heycam/byte-002.html | 19 +++++++++++ .../heycam/callback-function-type-003.html | 23 +++++++++++++ .../heycam/dictionary-type-002.html | 32 +++++++++++++++++++ .../tests/submissions/heycam/double-003.html | 24 ++++++++++++++ .../tests/submissions/heycam/float-003.html | 29 +++++++++++++++++ .../heycam/interface-type-004.html | 25 +++++++++++++++ WebIDL/tests/submissions/heycam/long-003.html | 25 +++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 23 +++++++++++-- .../submissions/heycam/nullable-003.html | 22 +++++++++++++ .../tests/submissions/heycam/object-002.html | 17 ++++++++++ .../tests/submissions/heycam/octet-002.html | 19 +++++++++++ .../submissions/heycam/sequence-002.html | 29 +++++++++++++++++ .../tests/submissions/heycam/short-002.html | 19 +++++++++++ .../heycam/unrestricted-double-004.html | 23 +++++++++++++ .../heycam/unrestricted-float-002.html | 21 ++++++++++++ .../submissions/heycam/unsigned-long-003.html | 25 +++++++++++++++ .../heycam/unsigned-short-003.html | 25 +++++++++++++++ 20 files changed, 464 insertions(+), 2 deletions(-) create mode 100644 WebIDL/tests/submissions/heycam/DOMString-003.html create mode 100644 WebIDL/tests/submissions/heycam/Date-002.html create mode 100644 WebIDL/tests/submissions/heycam/boolean-002.html create mode 100644 WebIDL/tests/submissions/heycam/byte-002.html create mode 100644 WebIDL/tests/submissions/heycam/callback-function-type-003.html create mode 100644 WebIDL/tests/submissions/heycam/dictionary-type-002.html create mode 100644 WebIDL/tests/submissions/heycam/double-003.html create mode 100644 WebIDL/tests/submissions/heycam/float-003.html create mode 100644 WebIDL/tests/submissions/heycam/interface-type-004.html create mode 100644 WebIDL/tests/submissions/heycam/long-003.html create mode 100644 WebIDL/tests/submissions/heycam/nullable-003.html create mode 100644 WebIDL/tests/submissions/heycam/object-002.html create mode 100644 WebIDL/tests/submissions/heycam/octet-002.html create mode 100644 WebIDL/tests/submissions/heycam/sequence-002.html create mode 100644 WebIDL/tests/submissions/heycam/short-002.html create mode 100644 WebIDL/tests/submissions/heycam/unrestricted-double-004.html create mode 100644 WebIDL/tests/submissions/heycam/unrestricted-float-002.html create mode 100644 WebIDL/tests/submissions/heycam/unsigned-long-003.html create mode 100644 WebIDL/tests/submissions/heycam/unsigned-short-003.html diff --git a/WebIDL/tests/submissions/heycam/DOMString-003.html b/WebIDL/tests/submissions/heycam/DOMString-003.html new file mode 100644 index 00000000000000..1843bc9d9bb39b --- /dev/null +++ b/WebIDL/tests/submissions/heycam/DOMString-003.html @@ -0,0 +1,23 @@ + +DOMString + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/Date-002.html b/WebIDL/tests/submissions/heycam/Date-002.html new file mode 100644 index 00000000000000..2809d9bf9282e2 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/Date-002.html @@ -0,0 +1,22 @@ + +Date + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/boolean-002.html b/WebIDL/tests/submissions/heycam/boolean-002.html new file mode 100644 index 00000000000000..1f0a901e69771a --- /dev/null +++ b/WebIDL/tests/submissions/heycam/boolean-002.html @@ -0,0 +1,21 @@ + +boolean + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/byte-002.html b/WebIDL/tests/submissions/heycam/byte-002.html new file mode 100644 index 00000000000000..fd92a536ecf47b --- /dev/null +++ b/WebIDL/tests/submissions/heycam/byte-002.html @@ -0,0 +1,19 @@ + +byte + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/callback-function-type-003.html b/WebIDL/tests/submissions/heycam/callback-function-type-003.html new file mode 100644 index 00000000000000..f74d14235c19be --- /dev/null +++ b/WebIDL/tests/submissions/heycam/callback-function-type-003.html @@ -0,0 +1,23 @@ + +Callback function types + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/dictionary-type-002.html b/WebIDL/tests/submissions/heycam/dictionary-type-002.html new file mode 100644 index 00000000000000..fc4e5e40e8e1b2 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/dictionary-type-002.html @@ -0,0 +1,32 @@ + +Dictionary type returned from an operation + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/double-003.html b/WebIDL/tests/submissions/heycam/double-003.html new file mode 100644 index 00000000000000..95264acdd22799 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/double-003.html @@ -0,0 +1,24 @@ + +double + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/float-003.html b/WebIDL/tests/submissions/heycam/float-003.html new file mode 100644 index 00000000000000..3e6aaa8fec0619 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/float-003.html @@ -0,0 +1,29 @@ + +float + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/interface-type-004.html b/WebIDL/tests/submissions/heycam/interface-type-004.html new file mode 100644 index 00000000000000..b46f7fea7a2cb3 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/interface-type-004.html @@ -0,0 +1,25 @@ + +Interface types for regular interfaces + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/long-003.html b/WebIDL/tests/submissions/heycam/long-003.html new file mode 100644 index 00000000000000..65cfef424be782 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/long-003.html @@ -0,0 +1,25 @@ + +long + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 19401dc944f08b..2955469eed774a 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -1,9 +1,11 @@ ArrayClass-001.html Clamp-001.html Constructor-001.html -Date-001.html DOMString-001.html DOMString-002.html +DOMString-003.html +Date-001.html +Date-002.html LenientThis-001.html NamedConstructor-001.html NamedPropertiesObject-001.html @@ -20,17 +22,23 @@ TreatNullAs-002.html Unforgeable-001.html any-001.html boolean-001.html +boolean-002.html byte-001.html +byte-002.html callback-function-type-001.html callback-function-type-002.html +callback-function-type-003.html class-string-001.html dictionary-type-001.html +dictionary-type-002.html double-001.html double-002.html +double-003.html enum-type-001.html extensible-001.html float-001.html float-002.html +float-003.html functions-001.html initial-001.html initial-002.html @@ -40,21 +48,32 @@ interface-object-002.html interface-type-001.html interface-type-002.html interface-type-003.html +interface-type-004.html long-001.html long-002.html +long-003.html nullable-001.html nullable-002.html +nullable-003.html object-001.html +object-002.html octet-001.html +octet-002.html sequence-001.html +sequence-002.html short-001.html +short-002.html union-001.html -unrestricted-float-001.html unrestricted-double-001.html unrestricted-double-002.html unrestricted-double-003.html +unrestricted-double-004.html +unrestricted-float-001.html +unrestricted-float-002.html unsigned-long-001.html unsigned-long-002.html +unsigned-long-003.html unsigned-short-001.html unsigned-short-002.html +unsigned-short-003.html void-001.html diff --git a/WebIDL/tests/submissions/heycam/nullable-003.html b/WebIDL/tests/submissions/heycam/nullable-003.html new file mode 100644 index 00000000000000..eb60aafa916d85 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/nullable-003.html @@ -0,0 +1,22 @@ + +Nullable types + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/object-002.html b/WebIDL/tests/submissions/heycam/object-002.html new file mode 100644 index 00000000000000..a59c2548943678 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/object-002.html @@ -0,0 +1,17 @@ + +object + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/octet-002.html b/WebIDL/tests/submissions/heycam/octet-002.html new file mode 100644 index 00000000000000..5c7374e44d6488 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/octet-002.html @@ -0,0 +1,19 @@ + +octet + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/sequence-002.html b/WebIDL/tests/submissions/heycam/sequence-002.html new file mode 100644 index 00000000000000..ba59eb133379ad --- /dev/null +++ b/WebIDL/tests/submissions/heycam/sequence-002.html @@ -0,0 +1,29 @@ + +Sequence types + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/short-002.html b/WebIDL/tests/submissions/heycam/short-002.html new file mode 100644 index 00000000000000..b3b85af31c7e76 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/short-002.html @@ -0,0 +1,19 @@ + +short + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/unrestricted-double-004.html b/WebIDL/tests/submissions/heycam/unrestricted-double-004.html new file mode 100644 index 00000000000000..d8f1446fc0ff78 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/unrestricted-double-004.html @@ -0,0 +1,23 @@ + +unrestricted double + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/unrestricted-float-002.html b/WebIDL/tests/submissions/heycam/unrestricted-float-002.html new file mode 100644 index 00000000000000..66abc0c3e683ba --- /dev/null +++ b/WebIDL/tests/submissions/heycam/unrestricted-float-002.html @@ -0,0 +1,21 @@ + +unrestricted float + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/unsigned-long-003.html b/WebIDL/tests/submissions/heycam/unsigned-long-003.html new file mode 100644 index 00000000000000..70d055f07e0464 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/unsigned-long-003.html @@ -0,0 +1,25 @@ + +unsigned long + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/unsigned-short-003.html b/WebIDL/tests/submissions/heycam/unsigned-short-003.html new file mode 100644 index 00000000000000..c7472e6c5c9f9f --- /dev/null +++ b/WebIDL/tests/submissions/heycam/unsigned-short-003.html @@ -0,0 +1,25 @@ + +short + + + +
+ + From 38bb72702d7e5f6f89eeb0b05671e116240fb702 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Thu, 9 May 2013 16:47:55 +1000 Subject: [PATCH 053/116] Test fixes. --- .../submissions/heycam/dictionary-type-002.html | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/dictionary-type-002.html b/WebIDL/tests/submissions/heycam/dictionary-type-002.html index fc4e5e40e8e1b2..9893b1870c4617 100644 --- a/WebIDL/tests/submissions/heycam/dictionary-type-002.html +++ b/WebIDL/tests/submissions/heycam/dictionary-type-002.html @@ -19,14 +19,15 @@ test(function() { var canvas = document.getElementById("canvas"); - var ctx = canvas.getContext("webgl"); + var ctx = canvas.getContext("webgl") || + canvas.getContext("experimental-webgl"); var attrs = ctx.getContextAttributes(); assert_equals(Object.getPrototypeOf(attrs), Object.prototype); - assert_property(attr, "alpha", { value: true, writable: true, enumerable: true, configurable: true }); - assert_property(attr, "depth", { value: true, writable: true, enumerable: true, configurable: true }); - assert_property(attr, "stencil", { value: false, writable: true, enumerable: true, configurable: true }); - assert_property(attr, "antialias", { value: true, writable: true, enumerable: true, configurable: true }); - assert_property(attr, "premultipliedAlpha", { value: true, writable: true, enumerable: true, configurable: true }); - assert_property(attr, "preserveDrawingBuffer", { value: false, writable: true, enumerable: true, configurable: true }); + assert_property(attrs, "alpha", { value: true, writable: true, enumerable: true, configurable: true }, "attrs.alpha"); + assert_property(attrs, "depth", { value: true, writable: true, enumerable: true, configurable: true }, "attrs.depth"); + assert_property(attrs, "stencil", { value: false, writable: true, enumerable: true, configurable: true }, "attrs.stencil"); + assert_property(attrs, "antialias", { value: true, writable: true, enumerable: true, configurable: true }, "attrs.antialias"); + assert_property(attrs, "premultipliedAlpha", { value: true, writable: true, enumerable: true, configurable: true }, "attrs.premultipliedAlpha"); + assert_property(attrs, "preserveDrawingBuffer", { value: false, writable: true, enumerable: true, configurable: true }, "attrs.preserveDrawingBuffer"); }, "WebGLRenderingContext.getContextAttributes() returns a dictionary value correctly"); From 2b54eff28465ad235b95412c76d82595c0316ace Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Fri, 10 May 2013 10:01:12 +1000 Subject: [PATCH 054/116] Add tests for constructor overload resolution and invocation. --- .../submissions/heycam/Constructor-002.html | 35 +++++++ .../submissions/heycam/Constructor-003.html | 52 +++++++++++ .../submissions/heycam/Constructor-004.html | 91 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 3 + 4 files changed, 181 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/Constructor-002.html create mode 100644 WebIDL/tests/submissions/heycam/Constructor-003.html create mode 100644 WebIDL/tests/submissions/heycam/Constructor-004.html diff --git a/WebIDL/tests/submissions/heycam/Constructor-002.html b/WebIDL/tests/submissions/heycam/Constructor-002.html new file mode 100644 index 00000000000000..b93e7214130150 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/Constructor-002.html @@ -0,0 +1,35 @@ + +Invoking constructors without overloading or optional arguments + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/Constructor-003.html b/WebIDL/tests/submissions/heycam/Constructor-003.html new file mode 100644 index 00000000000000..530f24843ad52c --- /dev/null +++ b/WebIDL/tests/submissions/heycam/Constructor-003.html @@ -0,0 +1,52 @@ + +Invoking constructors without overloading but with optional arguments + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/Constructor-004.html b/WebIDL/tests/submissions/heycam/Constructor-004.html new file mode 100644 index 00000000000000..c4c4e1b1d73790 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/Constructor-004.html @@ -0,0 +1,91 @@ + +Invoking constructors with overloading + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 2955469eed774a..2290b388af7cf6 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -1,6 +1,9 @@ ArrayClass-001.html Clamp-001.html Constructor-001.html +Constructor-002.html +Constructor-003.html +Constructor-004.html DOMString-001.html DOMString-002.html DOMString-003.html From 5c44e1f841699dbc0e417e006a3cb31975798dec Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Fri, 10 May 2013 10:12:37 +1000 Subject: [PATCH 055/116] Another subtest. --- WebIDL/tests/submissions/heycam/Constructor-004.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/WebIDL/tests/submissions/heycam/Constructor-004.html b/WebIDL/tests/submissions/heycam/Constructor-004.html index c4c4e1b1d73790..c84319a8aaef14 100644 --- a/WebIDL/tests/submissions/heycam/Constructor-004.html +++ b/WebIDL/tests/submissions/heycam/Constructor-004.html @@ -88,4 +88,10 @@ var a = new Uint8Array(buffer, 0, 2, "extra"); assert_equals(a.length, 2); }, "passing (ArrayBuffer, Number, Number, String) to the Uint8Array constructor selects the (ArrayBuffer, optional unsigned long, optional unsigned long) overload"); + +test(function() { + var buffer = new ArrayBuffer(5); + var a = new Uint8Array(buffer, undefined, undefined); + assert_equals(a.length, 0); +}, "passing (ArrayBuffer, undefined, undefined) to the Uint8Array constructor selects the (ArrayBuffer, optional unsigned long, optional unsigned long) overload with three arguments"); From f48ba587a984b9b66a0c0c4dc25dea8c0ebb2154 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Fri, 10 May 2013 10:42:31 +1000 Subject: [PATCH 056/116] Tests for constants. --- .../submissions/heycam/constant-001.html | 29 +++++++++++++++++++ .../submissions/heycam/constant-002.html | 17 +++++++++++ .../submissions/heycam/constant-003.html | 22 ++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 3 ++ 4 files changed, 71 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/constant-001.html create mode 100644 WebIDL/tests/submissions/heycam/constant-002.html create mode 100644 WebIDL/tests/submissions/heycam/constant-003.html diff --git a/WebIDL/tests/submissions/heycam/constant-001.html b/WebIDL/tests/submissions/heycam/constant-001.html new file mode 100644 index 00000000000000..e86b51c02a2bd6 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/constant-001.html @@ -0,0 +1,29 @@ + +Constants on interfaces + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/constant-002.html b/WebIDL/tests/submissions/heycam/constant-002.html new file mode 100644 index 00000000000000..ef07b11ebd5b3c --- /dev/null +++ b/WebIDL/tests/submissions/heycam/constant-002.html @@ -0,0 +1,17 @@ + +Constants on callback interfaces + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/constant-003.html b/WebIDL/tests/submissions/heycam/constant-003.html new file mode 100644 index 00000000000000..ebf7973acd54fb --- /dev/null +++ b/WebIDL/tests/submissions/heycam/constant-003.html @@ -0,0 +1,22 @@ + +Constants on interfaces + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 2290b388af7cf6..3ff1c23c001427 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -32,6 +32,9 @@ callback-function-type-001.html callback-function-type-002.html callback-function-type-003.html class-string-001.html +constant-001.html +constant-002.html +constant-003.html dictionary-type-001.html dictionary-type-002.html double-001.html From 972a7298fcfa154612ea14cc350298ac5da79fd2 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Fri, 10 May 2013 10:49:03 +1000 Subject: [PATCH 057/116] Fix title. --- WebIDL/tests/submissions/heycam/constant-003.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebIDL/tests/submissions/heycam/constant-003.html b/WebIDL/tests/submissions/heycam/constant-003.html index ebf7973acd54fb..7012e2f595e373 100644 --- a/WebIDL/tests/submissions/heycam/constant-003.html +++ b/WebIDL/tests/submissions/heycam/constant-003.html @@ -1,5 +1,5 @@ -Constants on interfaces +Constants on exceptions From 3d93ad33842cfd1f4d66bb74554f74c032ccbaab Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Fri, 10 May 2013 11:50:15 +1000 Subject: [PATCH 058/116] Tests for attributes. --- .../submissions/heycam/attribute-001.html | 65 ++++++++++++++++ .../submissions/heycam/attribute-002.html | 73 +++++++++++++++++ .../submissions/heycam/attribute-003.html | 71 +++++++++++++++++ .../submissions/heycam/attribute-004.html | 78 +++++++++++++++++++ .../submissions/heycam/attribute-005.html | 73 +++++++++++++++++ .../submissions/heycam/attribute-006.html | 78 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 6 ++ 7 files changed, 444 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/attribute-001.html create mode 100644 WebIDL/tests/submissions/heycam/attribute-002.html create mode 100644 WebIDL/tests/submissions/heycam/attribute-003.html create mode 100644 WebIDL/tests/submissions/heycam/attribute-004.html create mode 100644 WebIDL/tests/submissions/heycam/attribute-005.html create mode 100644 WebIDL/tests/submissions/heycam/attribute-006.html diff --git a/WebIDL/tests/submissions/heycam/attribute-001.html b/WebIDL/tests/submissions/heycam/attribute-001.html new file mode 100644 index 00000000000000..c8149d28bf4c01 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/attribute-001.html @@ -0,0 +1,65 @@ + +Getters for writable attributes + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/attribute-002.html b/WebIDL/tests/submissions/heycam/attribute-002.html new file mode 100644 index 00000000000000..aef8ef5beb1a4f --- /dev/null +++ b/WebIDL/tests/submissions/heycam/attribute-002.html @@ -0,0 +1,73 @@ + +Getters for writable attributes + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/attribute-003.html b/WebIDL/tests/submissions/heycam/attribute-003.html new file mode 100644 index 00000000000000..6c802dda858432 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/attribute-003.html @@ -0,0 +1,71 @@ + +Getters for read only attributes + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/attribute-004.html b/WebIDL/tests/submissions/heycam/attribute-004.html new file mode 100644 index 00000000000000..90577b7860eb74 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/attribute-004.html @@ -0,0 +1,78 @@ + +Getters for writable attributes + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/attribute-005.html b/WebIDL/tests/submissions/heycam/attribute-005.html new file mode 100644 index 00000000000000..2d387a5d524187 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/attribute-005.html @@ -0,0 +1,73 @@ + +Setters for writable attributes + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/attribute-006.html b/WebIDL/tests/submissions/heycam/attribute-006.html new file mode 100644 index 00000000000000..2f71755ee94b0c --- /dev/null +++ b/WebIDL/tests/submissions/heycam/attribute-006.html @@ -0,0 +1,78 @@ + +Setters for writable attributes + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 3ff1c23c001427..e42b036e7921a6 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -24,6 +24,12 @@ TreatNullAs-001.html TreatNullAs-002.html Unforgeable-001.html any-001.html +attribute-001.html +attribute-002.html +attribute-003.html +attribute-004.html +attribute-005.html +attribute-006.html boolean-001.html boolean-002.html byte-001.html From 2a34d4ecdfa77b88bac40ff00c4fe331b7ce7d1b Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Fri, 10 May 2013 12:24:29 +1000 Subject: [PATCH 059/116] Add another overloaded constructor subtest. --- .../submissions/heycam/Constructor-004.html | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/Constructor-004.html b/WebIDL/tests/submissions/heycam/Constructor-004.html index c84319a8aaef14..afe23fab50bb93 100644 --- a/WebIDL/tests/submissions/heycam/Constructor-004.html +++ b/WebIDL/tests/submissions/heycam/Constructor-004.html @@ -18,10 +18,10 @@ // argument might then cause the call to fail (and a TypeError to be thrown) if // there is not an appropriate value passed in that position. // -// With Uint8Array, which is what we are using in this test, it's not possible -// to test the "arguments before the distinguishing argument are converted -// before possibly throwing due to an invalid value in that argument position" -// since the distinguishing argument index is 0. +// With both Uint8Array and Blob, the two interfaces we are using in this test, +// it's not possible to test the "arguments before the distinguishing argument +// are converted before possibly throwing due to an invalid value in that +// argument position" since the distinguishing argument index is < 1. test(function() { assert_throws({ name: "TypeError" }, function() { new Uint8Array(); }); @@ -94,4 +94,27 @@ var a = new Uint8Array(buffer, undefined, undefined); assert_equals(a.length, 0); }, "passing (ArrayBuffer, undefined, undefined) to the Uint8Array constructor selects the (ArrayBuffer, optional unsigned long, optional unsigned long) overload with three arguments"); + + +test(function() { + var b = new Blob(); + assert_equals(b.size, 0); +}, "passing no arguments to the Blob constructor selects the () overload"); + +test(function() { + var b1 = new Blob([]); + var b2 = new Blob([], { }); + assert_equals(b1.size, 0); + assert_equals(b1.type, b2.type); +}, "passing an Array object as the only argument to the Blob constructor selects the (sequence<...>, optional BlobPropertyBag) overload"); + +test(function() { + var b = new Blob({ size: 3, "0": "a" }); + assert_equals(b.size, "aundefinedundefined".size); +}, "passing { size: 3, \"0\": \"a\" } as the only argument to the Blob constructor selects the (sequence<...>, optional BlobPropertyBag) overload"); + +test(function() { + var b = new Blob(["abc"], { }, "extra"); + assert_equals(b.size, 3); +}, "passing ([\"abc\"], { }, \"extra\") to the Blob constructor selects the (sequence<...>, optional BlobPropertyBag) overload"); From 0f4ca251d2a44f44fa26e5ec8b536b6af6ca8216 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Fri, 10 May 2013 12:24:49 +1000 Subject: [PATCH 060/116] Add subtests for static operations. --- WebIDL/tests/submissions/heycam/functions-001.html | 3 +++ WebIDL/tests/submissions/heycam/initial-001.html | 3 +++ 2 files changed, 6 insertions(+) diff --git a/WebIDL/tests/submissions/heycam/functions-001.html b/WebIDL/tests/submissions/heycam/functions-001.html index c47da1f7bf4b1d..38eefa76bf06d7 100644 --- a/WebIDL/tests/submissions/heycam/functions-001.html +++ b/WebIDL/tests/submissions/heycam/functions-001.html @@ -42,6 +42,9 @@ operation("HTMLElement", "click"), "HTMLElement.click function", operation("Node", "appendChild"), "Node.appendChild function", + // static operation + staticOperation("URL", "createObjectURL"), "URL.createObjectURL static function", + // stringifier function stringifier("DOMTokenList"), "DOMTokenList stringifier function", diff --git a/WebIDL/tests/submissions/heycam/initial-001.html b/WebIDL/tests/submissions/heycam/initial-001.html index f07ac2affa1283..bcdd3b9ed4cdfa 100644 --- a/WebIDL/tests/submissions/heycam/initial-001.html +++ b/WebIDL/tests/submissions/heycam/initial-001.html @@ -52,6 +52,9 @@ operation("HTMLElement", "click"), operation("HTMLElement", "click", w), "HTMLElement.click function", operation("Node", "appendChild"), operation("Node", "appendChild", w), "Node.appendChild function", + // static operation function + staticOperation("URL", "createObjectURL"), staticOperation("URL", "createObjectURL", w), "URL.createObjectURL function", + // stringifier function stringifier("DOMTokenList"), stringifier("DOMTokenList", w), "DOMTokenList stringifier function", From 18edb0398241cacb51e37121d30cc58c0d4a431c Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Fri, 10 May 2013 15:33:30 +1000 Subject: [PATCH 061/116] Tweak comments. --- WebIDL/tests/submissions/heycam/attribute-001.html | 3 ++- WebIDL/tests/submissions/heycam/attribute-002.html | 3 ++- WebIDL/tests/submissions/heycam/attribute-003.html | 3 ++- WebIDL/tests/submissions/heycam/attribute-004.html | 3 ++- WebIDL/tests/submissions/heycam/attribute-005.html | 3 ++- WebIDL/tests/submissions/heycam/attribute-006.html | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/attribute-001.html b/WebIDL/tests/submissions/heycam/attribute-001.html index c8149d28bf4c01..532bce3a30c6ad 100644 --- a/WebIDL/tests/submissions/heycam/attribute-001.html +++ b/WebIDL/tests/submissions/heycam/attribute-001.html @@ -16,7 +16,8 @@ // object and are enumerable and configurable. These are accessor properties // always have a getter. The getter expects no arguments, and will ignore // extra ones. The getter can be applied to objects of the right type -// from other windows. +// from other windows. Calling it with a bad this object value will throw +// a TypeError. test(function() { assert_true(!document.hasOwnProperty("title")); diff --git a/WebIDL/tests/submissions/heycam/attribute-002.html b/WebIDL/tests/submissions/heycam/attribute-002.html index aef8ef5beb1a4f..b45bd52d22f15d 100644 --- a/WebIDL/tests/submissions/heycam/attribute-002.html +++ b/WebIDL/tests/submissions/heycam/attribute-002.html @@ -20,7 +20,8 @@ // object and are enumerable and configurable. These are accessor properties // always have a getter. The getter expects no arguments, and will ignore // extra ones. The getter can be applied to objects of the right type -// from other windows. +// from other windows. Calling it with a bad this object value will throw +// a TypeError. var select = document.getElementById("select"); diff --git a/WebIDL/tests/submissions/heycam/attribute-003.html b/WebIDL/tests/submissions/heycam/attribute-003.html index 6c802dda858432..0d2c519ca3e1de 100644 --- a/WebIDL/tests/submissions/heycam/attribute-003.html +++ b/WebIDL/tests/submissions/heycam/attribute-003.html @@ -16,7 +16,8 @@ // object and are enumerable and configurable. These are accessor properties // always have a getter. The getter expects no arguments, and will ignore // extra ones. The getter can be applied to objects of the right type -// from other windows. +// from other windows. Calling it with a bad this object value will throw +// a TypeError. test(function() { assert_true(!document.documentElement.hasOwnProperty("parentNode")); diff --git a/WebIDL/tests/submissions/heycam/attribute-004.html b/WebIDL/tests/submissions/heycam/attribute-004.html index 90577b7860eb74..afdf165575c926 100644 --- a/WebIDL/tests/submissions/heycam/attribute-004.html +++ b/WebIDL/tests/submissions/heycam/attribute-004.html @@ -20,7 +20,8 @@ // object and are enumerable and configurable. These are accessor properties // always have a getter. The getter expects no arguments, and will ignore // extra ones. The getter can be applied to objects of the right type -// from other windows. +// from other windows. Calling it with a bad this object value will throw +// a TypeError. var form = document.getElementById("form"); diff --git a/WebIDL/tests/submissions/heycam/attribute-005.html b/WebIDL/tests/submissions/heycam/attribute-005.html index 2d387a5d524187..f7e0cc1ab8b0fa 100644 --- a/WebIDL/tests/submissions/heycam/attribute-005.html +++ b/WebIDL/tests/submissions/heycam/attribute-005.html @@ -17,7 +17,8 @@ // and have a setter if they are not read only. The setter expects one // argument, and will ignore extra ones. If no argument is passed, a TypeError // is thrown. The setter can be applied to objects of the right type from -// other windows. +// other windows. Calling it with a bad this object value will throw +// a TypeError. test(function() { var desc = Object.getOwnPropertyDescriptor(Document.prototype, "title"); diff --git a/WebIDL/tests/submissions/heycam/attribute-006.html b/WebIDL/tests/submissions/heycam/attribute-006.html index 2f71755ee94b0c..809dba3109aea6 100644 --- a/WebIDL/tests/submissions/heycam/attribute-006.html +++ b/WebIDL/tests/submissions/heycam/attribute-006.html @@ -21,7 +21,8 @@ // and have a setter if they are not read only. The setter expects one // argument, and will ignore extra ones. If no argument is passed, a TypeError // is thrown. The setter can be applied to objects of the right type from -// other windows. +// other windows. Calling it with a bad this object value will throw +// a TypeError. var select = document.getElementById("select"); From b49422d27adba87b2284900a25602492dbf3128b Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Fri, 10 May 2013 18:44:07 +1000 Subject: [PATCH 062/116] Some tests for operations. --- .../submissions/heycam/operation-001.html | 45 ++++++++++++ .../submissions/heycam/operation-002.html | 72 +++++++++++++++++++ WebIDL/tests/submissions/heycam/utils.js | 5 ++ 3 files changed, 122 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/operation-001.html create mode 100644 WebIDL/tests/submissions/heycam/operation-002.html diff --git a/WebIDL/tests/submissions/heycam/operation-001.html b/WebIDL/tests/submissions/heycam/operation-001.html new file mode 100644 index 00000000000000..c2b66906426153 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/operation-001.html @@ -0,0 +1,45 @@ + +Regular operations + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/operation-002.html b/WebIDL/tests/submissions/heycam/operation-002.html new file mode 100644 index 00000000000000..7fc5247d94aece --- /dev/null +++ b/WebIDL/tests/submissions/heycam/operation-002.html @@ -0,0 +1,72 @@ + +Invoking regular operations without overloading but with optional arguments + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/utils.js b/WebIDL/tests/submissions/heycam/utils.js index 52522ab462822b..1b568fb5531e5e 100644 --- a/WebIDL/tests/submissions/heycam/utils.js +++ b/WebIDL/tests/submissions/heycam/utils.js @@ -24,11 +24,16 @@ function operation(interfaceName, operationName, w) { return function() { return Object.getOwnPropertyDescriptor((w || window)[interfaceName].prototype, operationName).value; } } +function staticOperation(interfaceName, operationName, w) { + return function() { return Object.getOwnPropertyDescriptor((w || window)[interfaceName], operationName).value; } +} + function stringifier(interfaceName, w) { return operation(interfaceName, "toString", w); } function assert_descriptor(desc1, desc2, description) { + description = description || "property"; assert_true(!!desc1, description + " exists"); if ("value" in desc2) { assert_equals(desc1.value, desc2.value, description + " [[Value]]"); From 5090995322245066bf63fad43027a726b64411b9 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Fri, 10 May 2013 18:45:28 +1000 Subject: [PATCH 063/116] Check for TypeError more idiomatically. --- WebIDL/tests/submissions/heycam/Constructor-001.html | 2 +- WebIDL/tests/submissions/heycam/Constructor-002.html | 2 +- WebIDL/tests/submissions/heycam/Constructor-003.html | 6 +++--- WebIDL/tests/submissions/heycam/Constructor-004.html | 8 ++++---- WebIDL/tests/submissions/heycam/DOMString-001.html | 4 ++-- WebIDL/tests/submissions/heycam/DOMString-002.html | 4 ++-- WebIDL/tests/submissions/heycam/Date-001.html | 6 +++--- WebIDL/tests/submissions/heycam/PutForwards-001.html | 2 +- WebIDL/tests/submissions/heycam/attribute-001.html | 4 ++-- WebIDL/tests/submissions/heycam/attribute-002.html | 4 ++-- WebIDL/tests/submissions/heycam/attribute-003.html | 4 ++-- WebIDL/tests/submissions/heycam/attribute-004.html | 4 ++-- WebIDL/tests/submissions/heycam/attribute-005.html | 6 +++--- WebIDL/tests/submissions/heycam/attribute-006.html | 6 +++--- WebIDL/tests/submissions/heycam/byte-001.html | 4 ++-- .../heycam/callback-function-type-001.html | 12 ++++++------ .../submissions/heycam/dictionary-type-001.html | 4 ++-- WebIDL/tests/submissions/heycam/double-001.html | 10 +++++----- WebIDL/tests/submissions/heycam/double-002.html | 10 +++++----- WebIDL/tests/submissions/heycam/enum-type-001.html | 4 ++-- WebIDL/tests/submissions/heycam/float-001.html | 10 +++++----- WebIDL/tests/submissions/heycam/float-002.html | 10 +++++----- .../tests/submissions/heycam/interface-type-001.html | 2 +- .../tests/submissions/heycam/interface-type-002.html | 2 +- .../tests/submissions/heycam/interface-type-003.html | 10 +++++----- WebIDL/tests/submissions/heycam/long-001.html | 4 ++-- WebIDL/tests/submissions/heycam/long-002.html | 4 ++-- WebIDL/tests/submissions/heycam/nullable-001.html | 2 +- WebIDL/tests/submissions/heycam/nullable-002.html | 8 ++++---- WebIDL/tests/submissions/heycam/object-001.html | 2 +- WebIDL/tests/submissions/heycam/octet-001.html | 4 ++-- WebIDL/tests/submissions/heycam/short-001.html | 4 ++-- WebIDL/tests/submissions/heycam/union-001.html | 2 +- .../submissions/heycam/unrestricted-double-001.html | 6 +++--- .../submissions/heycam/unrestricted-double-002.html | 4 ++-- .../submissions/heycam/unrestricted-float-001.html | 4 ++-- .../tests/submissions/heycam/unsigned-long-001.html | 4 ++-- .../tests/submissions/heycam/unsigned-long-002.html | 4 ++-- .../tests/submissions/heycam/unsigned-short-001.html | 4 ++-- .../tests/submissions/heycam/unsigned-short-002.html | 4 ++-- 40 files changed, 100 insertions(+), 100 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/Constructor-001.html b/WebIDL/tests/submissions/heycam/Constructor-001.html index 1cb30583fb3976..871e9aaa6bbdeb 100644 --- a/WebIDL/tests/submissions/heycam/Constructor-001.html +++ b/WebIDL/tests/submissions/heycam/Constructor-001.html @@ -14,7 +14,7 @@ // also be a "length" property on the interface object. test(function() { - assert_throws({ name: "TypeError" }, function() { new Element(); }, "new Element()"); + assert_throws(new TypeError(), function() { new Element(); }, "new Element()"); }, "Calling new on an interface object whose interface does not have [Constructor]") test(function() { diff --git a/WebIDL/tests/submissions/heycam/Constructor-002.html b/WebIDL/tests/submissions/heycam/Constructor-002.html index b93e7214130150..1030b5e10d74d6 100644 --- a/WebIDL/tests/submissions/heycam/Constructor-002.html +++ b/WebIDL/tests/submissions/heycam/Constructor-002.html @@ -15,7 +15,7 @@ // entry in the effective overload set. test(function() { - assert_throws({ name: "TypeError" }, function() { new ArrayBuffer(); }); + assert_throws(new TypeError(), function() { new ArrayBuffer(); }); }, "passing too few arguments to ArrayBuffer constructor throws"); test(function() { diff --git a/WebIDL/tests/submissions/heycam/Constructor-003.html b/WebIDL/tests/submissions/heycam/Constructor-003.html index 530f24843ad52c..c377e3d8a86557 100644 --- a/WebIDL/tests/submissions/heycam/Constructor-003.html +++ b/WebIDL/tests/submissions/heycam/Constructor-003.html @@ -17,7 +17,7 @@ // trailing missing arguments. test(function() { - assert_throws({ name: "TypeError" }, function() { new Event(); }); + assert_throws(new TypeError(), function() { new Event(); }); }, "passing too few arguments to Event constructor throws"); test(function() { @@ -28,7 +28,7 @@ }, "passing one argument to Event constructor will use the default argument value"); test(function() { - assert_throws({ name: "TypeError" }, function() { new Event("click", false); }); + assert_throws(new TypeError(), function() { new Event("click", false); }); }, "passing a bad type as the Event constructor optional argument value throws an exception"); test(function() { @@ -37,7 +37,7 @@ }, "extra arguments passed to Event constructor are ignored"); test(function() { - assert_throws({ name: "TypeError" }, function() { new WebSocket(); }); + assert_throws(new TypeError(), function() { new WebSocket(); }); }, "passing too few arguments to WebSocket constructor throws"); test(function() { diff --git a/WebIDL/tests/submissions/heycam/Constructor-004.html b/WebIDL/tests/submissions/heycam/Constructor-004.html index afe23fab50bb93..50dc01872add03 100644 --- a/WebIDL/tests/submissions/heycam/Constructor-004.html +++ b/WebIDL/tests/submissions/heycam/Constructor-004.html @@ -24,7 +24,7 @@ // argument position" since the distinguishing argument index is < 1. test(function() { - assert_throws({ name: "TypeError" }, function() { new Uint8Array(); }); + assert_throws(new TypeError(), function() { new Uint8Array(); }); }, "passing too few arguments to Uint8Array constructor throws"); test(function() { @@ -57,16 +57,16 @@ }, "passing an ArrayBuffer as the only argument to the Uint8Array constructor selects the (ArrayBuffer, optional unsigned long, optional unsigned long) overload"); test(function() { - assert_throws({ name: "TypeError" }, function() { new Uint8Array(3, "extra"); }); + assert_throws(new TypeError(), function() { new Uint8Array(3, "extra"); }); }, "passing (Number, String) to the Uint8Array constructor selects the (ArrayBuffer, optional unsigned long, optional unsigned long) overload, and then throws due to the conversion of the Number to an ArrayBuffer"); test(function() { var a1 = new Uint8Array(4); - assert_throws({ name: "TypeError" }, function() { new Uint8Array(a1, "extra"); }); + assert_throws(new TypeError(), function() { new Uint8Array(a1, "extra"); }); }, "passing (Uint8Array, String) to the Uint8Array constructor selects the (ArrayBuffer, optional unsigned long, optional unsigned long) overload, and then throws due to the conversion of the Uint8Array to an ArrayBuffer"); test(function() { - assert_throws({ name: "TypeError" }, function() { new Uint8Array([9, 9, 9], "extra"); }); + assert_throws(new TypeError(), function() { new Uint8Array([9, 9, 9], "extra"); }); }, "passing (Array, String) to the Uint8Array constructor selects the (ArrayBuffer, optional unsigned long, optional unsigned long) overload, and then throws due to the conversion of the Array to an ArrayBuffer"); test(function() { diff --git a/WebIDL/tests/submissions/heycam/DOMString-001.html b/WebIDL/tests/submissions/heycam/DOMString-001.html index 9cde87e51ef6a9..88693f7444d37d 100644 --- a/WebIDL/tests/submissions/heycam/DOMString-001.html +++ b/WebIDL/tests/submissions/heycam/DOMString-001.html @@ -76,7 +76,7 @@ assert_equals(attr.value, expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { attr.value = objectValue; }); + assert_throws(new TypeError(), function() { attr.value = objectValue; }); } }, "assigning { valueOf: function() { return " + desc + " } } to Attr.value coerces the value to an IDL DOMString correctly"); } @@ -92,7 +92,7 @@ assert_equals(attr.value, expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { attr.value = objectValue; }); + assert_throws(new TypeError(), function() { attr.value = objectValue; }); } }, "assigning { toString: function() { return " + desc + " } } to Attr.value coerces the value to an IDL DOMString correctly"); } diff --git a/WebIDL/tests/submissions/heycam/DOMString-002.html b/WebIDL/tests/submissions/heycam/DOMString-002.html index 590410da30f662..54f4c7d7cd6f00 100644 --- a/WebIDL/tests/submissions/heycam/DOMString-002.html +++ b/WebIDL/tests/submissions/heycam/DOMString-002.html @@ -77,7 +77,7 @@ assert_equals(span.textContent, "." + expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { span.firstChild.appendData(objectValue); }); + assert_throws(new TypeError(), function() { span.firstChild.appendData(objectValue); }); } }, "passing { valueOf: function() { return " + desc + " } } to CharacterData.appendData coerces the value to an IDL DOMString correctly"); } @@ -94,7 +94,7 @@ assert_equals(span.textContent, "." + expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { span.firstChild.appendData(objectValue); }); + assert_throws(new TypeError(), function() { span.firstChild.appendData(objectValue); }); } }, "passing { toString: function() { return " + desc + " } } to CharacterData.appendData coerces the value to an IDL DOMString correctly"); } diff --git a/WebIDL/tests/submissions/heycam/Date-001.html b/WebIDL/tests/submissions/heycam/Date-001.html index 0c921705cffc5c..54e9f83340d4fb 100644 --- a/WebIDL/tests/submissions/heycam/Date-001.html +++ b/WebIDL/tests/submissions/heycam/Date-001.html @@ -55,19 +55,19 @@ test(function() { var input = document.createElement("input"); input.type = "date"; - assert_throws({ name: "TypeError" }, function() { input.valueAsDate = Object.create(new Date()); }); + assert_throws(new TypeError(), function() { input.valueAsDate = Object.create(new Date()); }); }, "test assigning { } -> Date to HTMLInputElement.valueAsDate"); test(function() { var input = document.createElement("input"); input.type = "date"; - assert_throws({ name: "TypeError" }, function() { input.valueAsDate = 123; }); + assert_throws(new TypeError(), function() { input.valueAsDate = 123; }); }, "test assigning 123 to HTMLInputElement.valueAsDate"); test(function() { var input = document.createElement("input"); input.type = "date"; - assert_throws({ name: "TypeError" }, function() { input.valueAsDate = "2011-01-01"; }); + assert_throws(new TypeError(), function() { input.valueAsDate = "2011-01-01"; }); }, "test assigning \"2011-01-01\" to HTMLInputElement.valueAsDate"); test(function() { diff --git a/WebIDL/tests/submissions/heycam/PutForwards-001.html b/WebIDL/tests/submissions/heycam/PutForwards-001.html index 9f70ea15e4ae36..d54324e18ea238 100644 --- a/WebIDL/tests/submissions/heycam/PutForwards-001.html +++ b/WebIDL/tests/submissions/heycam/PutForwards-001.html @@ -74,7 +74,7 @@ var e = document.getElementById("span1"); var desc = Object.getOwnPropertyDescriptor(HTMLElement.prototype, "style"); assert_true(!!desc, "!!desc"); - assert_throws({ name: "TypeError" }, function() { + assert_throws(new TypeError(), function() { desc.set.call(e.style); }); }, "HTMLElement.prototype.style setter throws TypeError when called with no arguments"); diff --git a/WebIDL/tests/submissions/heycam/attribute-001.html b/WebIDL/tests/submissions/heycam/attribute-001.html index 532bce3a30c6ad..0bf4356006960f 100644 --- a/WebIDL/tests/submissions/heycam/attribute-001.html +++ b/WebIDL/tests/submissions/heycam/attribute-001.html @@ -37,13 +37,13 @@ test(function() { var desc = Object.getOwnPropertyDescriptor(Document.prototype, "title"); assert_true(!!desc); - assert_throws({ name: "TypeError" }, function() { desc.get.call(null); }); + assert_throws(new TypeError(), function() { desc.get.call(null); }); }, "calling Document.title getter with a null this-value throws"); test(function() { var desc = Object.getOwnPropertyDescriptor(Document.prototype, "title"); assert_true(!!desc); - assert_throws({ name: "TypeError" }, function() { desc.get.call(document.documentElement); }); + assert_throws(new TypeError(), function() { desc.get.call(document.documentElement); }); }, "calling Document.title getter with a non-Document object this-value throws"); test(function() { diff --git a/WebIDL/tests/submissions/heycam/attribute-002.html b/WebIDL/tests/submissions/heycam/attribute-002.html index b45bd52d22f15d..75e4f46ae639f0 100644 --- a/WebIDL/tests/submissions/heycam/attribute-002.html +++ b/WebIDL/tests/submissions/heycam/attribute-002.html @@ -43,13 +43,13 @@ test(function() { var desc = Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "length"); assert_true(!!desc); - assert_throws({ name: "TypeError" }, function() { desc.get.call(null); }); + assert_throws(new TypeError(), function() { desc.get.call(null); }); }, "calling HTMLSelectElement.length getter with a null this-value throws"); test(function() { var desc = Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "length"); assert_true(!!desc); - assert_throws({ name: "TypeError" }, function() { desc.get.call(document); }); + assert_throws(new TypeError(), function() { desc.get.call(document); }); }, "calling HTMLSelectElement.length getter with a non-HTMLSelectElement object this-value throws"); test(function() { diff --git a/WebIDL/tests/submissions/heycam/attribute-003.html b/WebIDL/tests/submissions/heycam/attribute-003.html index 0d2c519ca3e1de..ce7b475974915a 100644 --- a/WebIDL/tests/submissions/heycam/attribute-003.html +++ b/WebIDL/tests/submissions/heycam/attribute-003.html @@ -42,13 +42,13 @@ test(function() { var desc = Object.getOwnPropertyDescriptor(Node.prototype, "parentNode"); assert_true(!!desc); - assert_throws({ name: "TypeError" }, function() { desc.get.call(null); }); + assert_throws(new TypeError(), function() { desc.get.call(null); }); }, "calling Node.parentNode getter with a null this-value throws"); test(function() { var desc = Object.getOwnPropertyDescriptor(Node.prototype, "parentNode"); assert_true(!!desc); - assert_throws({ name: "TypeError" }, function() { desc.get.call(new Range()); }); + assert_throws(new TypeError(), function() { desc.get.call(new Range()); }); }, "calling Node.parentNode getter with a non-Node object this-value throws"); test(function() { diff --git a/WebIDL/tests/submissions/heycam/attribute-004.html b/WebIDL/tests/submissions/heycam/attribute-004.html index afdf165575c926..77f4f5a925bcc6 100644 --- a/WebIDL/tests/submissions/heycam/attribute-004.html +++ b/WebIDL/tests/submissions/heycam/attribute-004.html @@ -48,13 +48,13 @@ test(function() { var desc = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, "length"); assert_true(!!desc); - assert_throws({ name: "TypeError" }, function() { desc.get.call(null); }); + assert_throws(new TypeError(), function() { desc.get.call(null); }); }, "calling HTMLFormElement.length getter with a null this-value throws"); test(function() { var desc = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, "length"); assert_true(!!desc); - assert_throws({ name: "TypeError" }, function() { desc.get.call(document); }); + assert_throws(new TypeError(), function() { desc.get.call(document); }); }, "calling HTMLFormElement.length getter with a non-HTMLFormElement object this-value throws"); test(function() { diff --git a/WebIDL/tests/submissions/heycam/attribute-005.html b/WebIDL/tests/submissions/heycam/attribute-005.html index f7e0cc1ab8b0fa..72f0e4b52ef844 100644 --- a/WebIDL/tests/submissions/heycam/attribute-005.html +++ b/WebIDL/tests/submissions/heycam/attribute-005.html @@ -29,13 +29,13 @@ test(function() { var desc = Object.getOwnPropertyDescriptor(Document.prototype, "title"); assert_true(!!desc); - assert_throws({ name: "TypeError" }, function() { desc.set.call(null); }); + assert_throws(new TypeError(), function() { desc.set.call(null); }); }, "calling Document.title setter with a null this-value throws"); test(function() { var desc = Object.getOwnPropertyDescriptor(Document.prototype, "title"); assert_true(!!desc); - assert_throws({ name: "TypeError" }, function() { desc.set.call(document.documentElement); }); + assert_throws(new TypeError(), function() { desc.set.call(document.documentElement); }); }, "calling Document.title setter with a non-Document object this-value throws"); test(function() { @@ -69,6 +69,6 @@ test(function() { var doc = document.implementation.createHTMLDocument("test"); var desc = Object.getOwnPropertyDescriptor(Document.prototype, "title"); - assert_throws({ name: "TypeError" }, function() { desc.set.call(doc); }); + assert_throws(new TypeError(), function() { desc.set.call(doc); }); }, "passing no arguments to Document.title setter will throw"); diff --git a/WebIDL/tests/submissions/heycam/attribute-006.html b/WebIDL/tests/submissions/heycam/attribute-006.html index 809dba3109aea6..3efc6bb5a79b1c 100644 --- a/WebIDL/tests/submissions/heycam/attribute-006.html +++ b/WebIDL/tests/submissions/heycam/attribute-006.html @@ -35,13 +35,13 @@ test(function() { var desc = Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "length"); assert_true(!!desc); - assert_throws({ name: "TypeError" }, function() { desc.set.call(null); }); + assert_throws(new TypeError(), function() { desc.set.call(null); }); }, "calling HTMLSelectElement.length setter with a null this-value throws"); test(function() { var desc = Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "length"); assert_true(!!desc); - assert_throws({ name: "TypeError" }, function() { desc.set.call(document, 0); }); + assert_throws(new TypeError(), function() { desc.set.call(document, 0); }); }, "calling HTMLSelectElement.length setter with a non-HTMLSelectElement object this-value throws"); test(function() { @@ -74,6 +74,6 @@ test(function() { var desc = Object.getOwnPropertyDescriptor(Document.prototype, "length"); - assert_throws({ name: "TypeError" }, function() { desc.set.call(select); }); + assert_throws(new TypeError(), function() { desc.set.call(select); }); }, "passing no arguments to HTMLSelectElement.length setter will throw"); diff --git a/WebIDL/tests/submissions/heycam/byte-001.html b/WebIDL/tests/submissions/heycam/byte-001.html index 7b928dc7d701a9..07a89b6bcf1e56 100644 --- a/WebIDL/tests/submissions/heycam/byte-001.html +++ b/WebIDL/tests/submissions/heycam/byte-001.html @@ -63,7 +63,7 @@ assert_equals(a[0], expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { a[0] = objectValue; }); + assert_throws(new TypeError(), function() { a[0] = objectValue; }); } }, "passing { valueOf: function() { return " + desc + " } } through an Int8Array indexed property setter coerces the value to an IDL byte correctly"); } @@ -79,7 +79,7 @@ assert_equals(a[0], expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { a[0] = objectValue; }); + assert_throws(new TypeError(), function() { a[0] = objectValue; }); } }, "passing { toString: function() { return " + desc + " } } through an Int8Array indexed property setter coerces the value to an IDL byte correctly"); } diff --git a/WebIDL/tests/submissions/heycam/callback-function-type-001.html b/WebIDL/tests/submissions/heycam/callback-function-type-001.html index 64328822c111d6..d5c1e37f255668 100644 --- a/WebIDL/tests/submissions/heycam/callback-function-type-001.html +++ b/WebIDL/tests/submissions/heycam/callback-function-type-001.html @@ -21,27 +21,27 @@ }, "passing a Function object to the MutationObserver constructor converts to an IDL callback function type correctly"); test(function() { - assert_throws({ name: "TypeError" }, function() { new MutationObserver(undefined); }); + assert_throws(new TypeError(), function() { new MutationObserver(undefined); }); }, "passing undefined to the MutationObserver constructor coverts to an IDL callback function type correctly"); test(function() { - assert_throws({ name: "TypeError" }, function() { new MutationObserver(null); }); + assert_throws(new TypeError(), function() { new MutationObserver(null); }); }, "passing null to the MutationObserver constructor coverts to an IDL callback function type correctly"); test(function() { - assert_throws({ name: "TypeError" }, function() { new MutationObserver(true); }); + assert_throws(new TypeError(), function() { new MutationObserver(true); }); }, "passing true to the MutationObserver constructor coverts to an IDL callback function type correctly"); test(function() { - assert_throws({ name: "TypeError" }, function() { new MutationObserver(123); }); + assert_throws(new TypeError(), function() { new MutationObserver(123); }); }, "passing 123 to the MutationObserver constructor coverts to an IDL callback function type correctly"); test(function() { - assert_throws({ name: "TypeError" }, function() { new MutationObserver("abc"); }); + assert_throws(new TypeError(), function() { new MutationObserver("abc"); }); }, "passing \"abc\" to the MutationObserver constructor coverts to an IDL callback function type correctly"); test(function() { - assert_throws({ name: "TypeError" }, function() { new MutationObserver({ }); }); + assert_throws(new TypeError(), function() { new MutationObserver({ }); }); }, "passing { } to the MutationObserver constructor coverts to an IDL callback function type correctly"); test(function() { diff --git a/WebIDL/tests/submissions/heycam/dictionary-type-001.html b/WebIDL/tests/submissions/heycam/dictionary-type-001.html index 3e2c98c6528e8f..b999c072a44fdb 100644 --- a/WebIDL/tests/submissions/heycam/dictionary-type-001.html +++ b/WebIDL/tests/submissions/heycam/dictionary-type-001.html @@ -33,11 +33,11 @@ }, "passing null to CustomEvent constructor"); test(function() { - assert_throws({ name: "TypeError" }, function() { new CustomEvent("test", false); }); + assert_throws(new TypeError(), function() { new CustomEvent("test", false); }); }, "passing false to CustomEvent constructor"); test(function() { - assert_throws({ name: "TypeError" }, function() { new CustomEvent("test", "hello"); }); + assert_throws(new TypeError(), function() { new CustomEvent("test", "hello"); }); }, "passing \"hello\" to CustomEvent constructor"); test(function() { diff --git a/WebIDL/tests/submissions/heycam/double-001.html b/WebIDL/tests/submissions/heycam/double-001.html index ec9745650dae8b..eeb89555079939 100644 --- a/WebIDL/tests/submissions/heycam/double-001.html +++ b/WebIDL/tests/submissions/heycam/double-001.html @@ -54,7 +54,7 @@ progress.value = value; assert_equals(progress.getAttribute("value"), String(expected)); } else { - assert_throws({ name: "TypeError" }, function() { progress.value = value; }); + assert_throws(new TypeError(), function() { progress.value = value; }); } }, "assigning " + desc + " to HTMLProgressElement.value coerces the value to an IDL double correctly"); } @@ -70,11 +70,11 @@ progress.value = objectValue; assert_equals(progress.getAttribute("value"), String(expected)); } else { - assert_throws({ name: "TypeError" }, function() { progress.value = objectValue; }); + assert_throws(new TypeError(), function() { progress.value = objectValue; }); } } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { progress.value = objectValue; }); + assert_throws(new TypeError(), function() { progress.value = objectValue; }); } }, "assigning { valueOf: function() { return " + desc + " } } to HTMLProgressElement.value coerces the value to an IDL double correctly"); } @@ -90,11 +90,11 @@ progress.value = objectValue; assert_equals(progress.getAttribute("value"), String(expected)); } else { - assert_throws({ name: "TypeError" }, function() { progress.value = objectValue; }); + assert_throws(new TypeError(), function() { progress.value = objectValue; }); } } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { progress.value = objectValue; }); + assert_throws(new TypeError(), function() { progress.value = objectValue; }); } }, "assigning { toString: function() { return " + desc + " } } to HTMLProgressElement.value coerces the value to an IDL double correctly"); } diff --git a/WebIDL/tests/submissions/heycam/double-002.html b/WebIDL/tests/submissions/heycam/double-002.html index cc8e117ec3fa69..516e020f75963a 100644 --- a/WebIDL/tests/submissions/heycam/double-002.html +++ b/WebIDL/tests/submissions/heycam/double-002.html @@ -54,7 +54,7 @@ meter.min = value; assert_equals(meter.getAttribute("min"), String(expected)); } else { - assert_throws({ name: "TypeError" }, function() { meter.min = value; }); + assert_throws(new TypeError(), function() { meter.min = value; }); } }, "assigning " + desc + " to HTMLMeterElement.min coerces the value to an IDL double correctly"); } @@ -70,11 +70,11 @@ meter.min = objectValue; assert_equals(meter.getAttribute("min"), String(expected)); } else { - assert_throws({ name: "TypeError" }, function() { meter.min = objectValue; }); + assert_throws(new TypeError(), function() { meter.min = objectValue; }); } } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { meter.min = objectValue; }); + assert_throws(new TypeError(), function() { meter.min = objectValue; }); } }, "assigning { valueOf: function() { return " + desc + " } } to HTMLMeterElement.min coerces the value to an IDL double correctly"); } @@ -90,11 +90,11 @@ meter.min = objectValue; assert_equals(meter.getAttribute("min"), String(expected)); } else { - assert_throws({ name: "TypeError" }, function() { meter.min = objectValue; }); + assert_throws(new TypeError(), function() { meter.min = objectValue; }); } } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { meter.min = objectValue; }); + assert_throws(new TypeError(), function() { meter.min = objectValue; }); } }, "assigning { toString: function() { return " + desc + " } } to HTMLMeterElement.min coerces the value to an IDL double correctly"); } diff --git a/WebIDL/tests/submissions/heycam/enum-type-001.html b/WebIDL/tests/submissions/heycam/enum-type-001.html index 530899c00fafaa..6cf285d7a00d23 100644 --- a/WebIDL/tests/submissions/heycam/enum-type-001.html +++ b/WebIDL/tests/submissions/heycam/enum-type-001.html @@ -36,11 +36,11 @@ }, "passing \"evenodd\" to CanvasRenderingContext2D.fill() converts to the CanvasFillRule enum correctly"); test(function() { - assert_throws({ name: "TypeError" }, function() { drawAndGetPixel("evenodd "); }); + assert_throws(new TypeError(), function() { drawAndGetPixel("evenodd "); }); }, "passing \"evenodd \" to CanvasRenderingContext2D.fill() converts to the CanvasFillRule enum correctly"); test(function() { - assert_throws({ name: "TypeError" }, function() { drawAndGetPixel("Evenodd"); }); + assert_throws(new TypeError(), function() { drawAndGetPixel("Evenodd"); }); }, "passing \"Evenodd\" to CanvasRenderingContext2D.fill() converts to the CanvasFillRule enum correctly"); test(function() { diff --git a/WebIDL/tests/submissions/heycam/float-001.html b/WebIDL/tests/submissions/heycam/float-001.html index 407ede9ac1bd0a..fcce2a7dcc7409 100644 --- a/WebIDL/tests/submissions/heycam/float-001.html +++ b/WebIDL/tests/submissions/heycam/float-001.html @@ -57,7 +57,7 @@ number.value = value; assert_equals(number.value, expected); } else { - assert_throws({ name: "TypeError" }, function() { number.value = value; }); + assert_throws(new TypeError(), function() { number.value = value; }); } }, "assigning " + desc + " to SVGNumber.value coerces the value to an IDL float correctly"); } @@ -73,11 +73,11 @@ number.value = objectValue; assert_equals(number.value, expected); } else { - assert_throws({ name: "TypeError" }, function() { number.value = objectValue; }); + assert_throws(new TypeError(), function() { number.value = objectValue; }); } } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { number.value = objectValue; }); + assert_throws(new TypeError(), function() { number.value = objectValue; }); } }, "assigning { valueOf: function() { return " + desc + " } } to SVGNumber.value coerces the value to an IDL float correctly"); } @@ -93,11 +93,11 @@ number.value = objectValue; assert_equals(number.value, expected); } else { - assert_throws({ name: "TypeError" }, function() { number.value = objectValue; }); + assert_throws(new TypeError(), function() { number.value = objectValue; }); } } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { number.value = objectValue; }); + assert_throws(new TypeError(), function() { number.value = objectValue; }); } }, "assigning { toString: function() { return " + desc + " } } to SVGNumber.value coerces the value to an IDL float correctly"); } diff --git a/WebIDL/tests/submissions/heycam/float-002.html b/WebIDL/tests/submissions/heycam/float-002.html index b1acc1f4139ed3..8ad7b5db891680 100644 --- a/WebIDL/tests/submissions/heycam/float-002.html +++ b/WebIDL/tests/submissions/heycam/float-002.html @@ -57,7 +57,7 @@ var m = matrix.translate(value, 0); assert_equals(m.e, expected); } else { - assert_throws({ name: "TypeError" }, function() { matrix.translate(value, 0); }); + assert_throws(new TypeError(), function() { matrix.translate(value, 0); }); } }, "passing " + desc + " to SVGMatrix.translate coerces the value to an IDL float correctly"); } @@ -73,11 +73,11 @@ var m = matrix.translate(objectValue, 0); assert_equals(m.e, expected); } else { - assert_throws({ name: "TypeError" }, function() { matrix.translate(objectValue, 0); }); + assert_throws(new TypeError(), function() { matrix.translate(objectValue, 0); }); } } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { matrix.translate(objectValue, 0); }); + assert_throws(new TypeError(), function() { matrix.translate(objectValue, 0); }); } }, "passing { valueOf: function() { return " + desc + " } } to SVGMatrix.translate coerces the value to an IDL float correctly"); } @@ -93,11 +93,11 @@ var m = matrix.translate(objectValue, 0); assert_equals(m.e, expected); } else { - assert_throws({ name: "TypeError" }, function() { matrix.translate(objectValue, 0); }); + assert_throws(new TypeError(), function() { matrix.translate(objectValue, 0); }); } } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { matrix.translate(objectValue, 0); }); + assert_throws(new TypeError(), function() { matrix.translate(objectValue, 0); }); } }, "passing { toString: function() { return " + desc + " } } to SVGMatrix.translate coerces the value to an IDL float correctly"); } diff --git a/WebIDL/tests/submissions/heycam/interface-type-001.html b/WebIDL/tests/submissions/heycam/interface-type-001.html index c59fe5e6d73930..4bd7f6fccc4add 100644 --- a/WebIDL/tests/submissions/heycam/interface-type-001.html +++ b/WebIDL/tests/submissions/heycam/interface-type-001.html @@ -54,7 +54,7 @@ div.appendChild(value); assert_equals(div.firstChild, expected); } else { - assert_throws({ name: "TypeError" }, function() { div.appendChild(value); }); + assert_throws(new TypeError(), function() { div.appendChild(value); }); } }, "passing " + desc + " to Node.appendChild() correctly converts to an IDL Node value"); } diff --git a/WebIDL/tests/submissions/heycam/interface-type-002.html b/WebIDL/tests/submissions/heycam/interface-type-002.html index 4f7d545faacc1f..ee316702373611 100644 --- a/WebIDL/tests/submissions/heycam/interface-type-002.html +++ b/WebIDL/tests/submissions/heycam/interface-type-002.html @@ -55,7 +55,7 @@ if (expected !== undefined) { assert_true(point.matrixTransform(value) instanceof expected); } else { - assert_throws({ name: "TypeError" }, function() { point.matrixTransform(point); }); + assert_throws(new TypeError(), function() { point.matrixTransform(point); }); } }, "passing " + desc + " to SVGPoint.matrixTransform() correctly converts to an IDL SVGMatrix value"); } diff --git a/WebIDL/tests/submissions/heycam/interface-type-003.html b/WebIDL/tests/submissions/heycam/interface-type-003.html index 8b3a0b4e1f4b59..fc78b553164563 100644 --- a/WebIDL/tests/submissions/heycam/interface-type-003.html +++ b/WebIDL/tests/submissions/heycam/interface-type-003.html @@ -34,17 +34,17 @@ test(function() { var span = document.createElement("span"); - assert_throws({ name: "TypeError" }, function() { span.addEventListener("test", false, false); }); + assert_throws(new TypeError(), function() { span.addEventListener("test", false, false); }); }, "passing false to EventTarget.addEventListener"); test(function() { var span = document.createElement("span"); - assert_throws({ name: "TypeError" }, function() { span.addEventListener("test", 0, false); }); + assert_throws(new TypeError(), function() { span.addEventListener("test", 0, false); }); }, "passing 0 to EventTarget.addEventListener"); test(function() { var span = document.createElement("span"); - assert_throws({ name: "TypeError" }, function() { span.addEventListener("test", "", false); }); + assert_throws(new TypeError(), function() { span.addEventListener("test", "", false); }); }, "passing \"\" to EventTarget.addEventListener"); test(function() { @@ -94,14 +94,14 @@ var span = document.createElement("span"); var regexp = /abc/; regexp.handleEvent = function() { }; - assert_throws({ name: "TypeError" }, function() { span.addEventListener("test", regexp, false); }); + assert_throws(new TypeError(), function() { span.addEventListener("test", regexp, false); }); }, "passing /abc/ to EventTarget.addEventListener"); test(function() { var span = document.createElement("span"); var date = new Date(); date.handleEvent = function() { }; - assert_throws({ name: "TypeError" }, function() { span.addEventListener("test", date, false); }); + assert_throws(new TypeError(), function() { span.addEventListener("test", date, false); }); }, "passing Date object to EventTarget.addEventListener"); test(function() { diff --git a/WebIDL/tests/submissions/heycam/long-001.html b/WebIDL/tests/submissions/heycam/long-001.html index 13062adb9b6b8c..437368197656ff 100644 --- a/WebIDL/tests/submissions/heycam/long-001.html +++ b/WebIDL/tests/submissions/heycam/long-001.html @@ -62,7 +62,7 @@ assert_equals(+pre.getAttribute("width"), expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { pre.width = objectValue; }); + assert_throws(new TypeError(), function() { pre.width = objectValue; }); } }, "assigning { valueOf: function() { return " + desc + " } } to HTMLPreElement.width coerces the value to an IDL long correctly"); } @@ -78,7 +78,7 @@ assert_equals(+pre.getAttribute("width"), expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { pre.width = objectValue; }); + assert_throws(new TypeError(), function() { pre.width = objectValue; }); } }, "assigning { toString: function() { return " + desc + " } } to HTMLPreElement.width coerces the value to an IDL long correctly"); } diff --git a/WebIDL/tests/submissions/heycam/long-002.html b/WebIDL/tests/submissions/heycam/long-002.html index 219f60802e8518..dadc6f472dbaec 100644 --- a/WebIDL/tests/submissions/heycam/long-002.html +++ b/WebIDL/tests/submissions/heycam/long-002.html @@ -62,7 +62,7 @@ assert_equals(+span.getAttribute("tabindex"), expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { span.tabIndex = objectValue; }); + assert_throws(new TypeError(), function() { span.tabIndex = objectValue; }); } }, "assigning { valueOf: function() { return " + desc + " } } to HTMLElement.tabIndex coerces the value to an IDL long correctly"); } @@ -78,7 +78,7 @@ assert_equals(+span.getAttribute("tabindex"), expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { span.tabIndex = objectValue; }); + assert_throws(new TypeError(), function() { span.tabIndex = objectValue; }); } }, "assigning { toString: function() { return " + desc + " } } to HTMLElement.tabIndex coerces the value to an IDL long correctly"); } diff --git a/WebIDL/tests/submissions/heycam/nullable-001.html b/WebIDL/tests/submissions/heycam/nullable-001.html index c115eeb2c3b9fe..42de1ef51f9468 100644 --- a/WebIDL/tests/submissions/heycam/nullable-001.html +++ b/WebIDL/tests/submissions/heycam/nullable-001.html @@ -69,6 +69,6 @@ var span = document.createElement("span"); span.textContent = "test"; assert_equals(span.textContent, "test"); - assert_throws({ name: "TypeError" }, function() { span.textContent = { toString: function() { return { }; } } }); + assert_throws(new TypeError(), function() { span.textContent = { toString: function() { return { }; } } }); }, "assigning { toString: ... { } } to Node.textContent converts to an IDL \"DOMString?\" type correctly"); diff --git a/WebIDL/tests/submissions/heycam/nullable-002.html b/WebIDL/tests/submissions/heycam/nullable-002.html index c24ff9152482fb..34a6d073b2b2fc 100644 --- a/WebIDL/tests/submissions/heycam/nullable-002.html +++ b/WebIDL/tests/submissions/heycam/nullable-002.html @@ -56,7 +56,7 @@ var span2 = document.createElement("span"); div.appendChild(span1); - assert_throws({ name: "TypeError" }, function() { div.insertBefore(span2, window); }); + assert_throws(new TypeError(), function() { div.insertBefore(span2, window); }); }, "passing window to Node.insertBefore converts to an IDL \"Node?\" type correctly"); test(function() { @@ -65,7 +65,7 @@ var span2 = document.createElement("span"); div.appendChild(span1); - assert_throws({ name: "TypeError" }, function() { div.insertBefore(span2, false); }); + assert_throws(new TypeError(), function() { div.insertBefore(span2, false); }); }, "passing false to Node.insertBefore converts to an IDL \"Node?\" type correctly"); test(function() { @@ -74,7 +74,7 @@ var span2 = document.createElement("span"); div.appendChild(span1); - assert_throws({ name: "TypeError" }, function() { div.insertBefore(span2, { }); }); + assert_throws(new TypeError(), function() { div.insertBefore(span2, { }); }); }, "passing { } to Node.insertBefore converts to an IDL \"Node?\" type correctly"); test(function() { @@ -83,6 +83,6 @@ var span2 = document.createElement("span"); div.appendChild(span1); - assert_throws({ name: "TypeError" }, function() { div.insertBefore(span2, Image); }); + assert_throws(new TypeError(), function() { div.insertBefore(span2, Image); }); }, "passing Image to Node.insertBefore converts to an IDL \"Node?\" type correctly"); diff --git a/WebIDL/tests/submissions/heycam/object-001.html b/WebIDL/tests/submissions/heycam/object-001.html index d184b50b6a9422..6b9927539818f6 100644 --- a/WebIDL/tests/submissions/heycam/object-001.html +++ b/WebIDL/tests/submissions/heycam/object-001.html @@ -40,7 +40,7 @@ var e = new TrackEvent("test", { track: value }); assert_equals(e.track, expected); } else { - assert_throws({ name: "TypeError" }, function() { new TrackEvent("test", { track: value }); }); + assert_throws(new TypeError(), function() { new TrackEvent("test", { track: value }); }); } }, "passing " + desc + " to the TrackEvent constructor correctly converts to an IDL object? value"); } diff --git a/WebIDL/tests/submissions/heycam/octet-001.html b/WebIDL/tests/submissions/heycam/octet-001.html index d4ac01596007c5..aa14c862092575 100644 --- a/WebIDL/tests/submissions/heycam/octet-001.html +++ b/WebIDL/tests/submissions/heycam/octet-001.html @@ -63,7 +63,7 @@ assert_equals(a[0], expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { a[0] = objectValue; }); + assert_throws(new TypeError(), function() { a[0] = objectValue; }); } }, "passing { valueOf: function() { return " + desc + " } } through an Uint8Array indexed property setter coerces the value to an IDL octet correctly"); } @@ -79,7 +79,7 @@ assert_equals(a[0], expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { a[0] = objectValue; }); + assert_throws(new TypeError(), function() { a[0] = objectValue; }); } }, "passing { toString: function() { return " + desc + " } } through an Uint8Array indexed property setter coerces the value to an IDL octet correctly"); } diff --git a/WebIDL/tests/submissions/heycam/short-001.html b/WebIDL/tests/submissions/heycam/short-001.html index 12a8f9049c174a..5392f01614b8ae 100644 --- a/WebIDL/tests/submissions/heycam/short-001.html +++ b/WebIDL/tests/submissions/heycam/short-001.html @@ -63,7 +63,7 @@ assert_equals(a[0], expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { a[0] = objectValue; }); + assert_throws(new TypeError(), function() { a[0] = objectValue; }); } }, "passing { valueOf: function() { return " + desc + " } } through an Int16Array indexed property setter coerces the value to an IDL short correctly"); } @@ -79,7 +79,7 @@ assert_equals(a[0], expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { a[0] = objectValue; }); + assert_throws(new TypeError(), function() { a[0] = objectValue; }); } }, "passing { toString: function() { return " + desc + " } } through an Int16Array indexed property setter coerces the value to an IDL short correctly"); } diff --git a/WebIDL/tests/submissions/heycam/union-001.html b/WebIDL/tests/submissions/heycam/union-001.html index 9f28599fcdc805..72cdd6b55aee79 100644 --- a/WebIDL/tests/submissions/heycam/union-001.html +++ b/WebIDL/tests/submissions/heycam/union-001.html @@ -84,7 +84,7 @@ test(function() { var select = makeSelect(); var option = document.createElement("option"); - assert_throws({ name: "TypeError" }, function() { select.add(option, { toString: function() { return { }; } }); }); + assert_throws(new TypeError(), function() { select.add(option, { toString: function() { return { }; } }); }); }, 'passing { toString: return { } } to HTMLSelectElement.add as the before argument correctly converts to "(HTMLElement or long)?"'); test(function() { diff --git a/WebIDL/tests/submissions/heycam/unrestricted-double-001.html b/WebIDL/tests/submissions/heycam/unrestricted-double-001.html index dfd6e18ebb021b..6d4b75b5364623 100644 --- a/WebIDL/tests/submissions/heycam/unrestricted-double-001.html +++ b/WebIDL/tests/submissions/heycam/unrestricted-double-001.html @@ -57,7 +57,7 @@ input.valueAsNumber = value; assert_equals(input.value, expected == expected ? String(expected) : ""); } else { - assert_throws({ name: "TypeError" }, function() { input.valueAsNumber = value; }); + assert_throws(new TypeError(), function() { input.valueAsNumber = value; }); } }, "assigning " + desc + " to HTMLInputElement.valueAsNumber coerces the value to an IDL unrestricted double correctly"); } @@ -75,7 +75,7 @@ // ToPrimitive() will throw a TypeError if valueOf and toString both // return an object. Also, Infinity and -Infinity will throw according // to HTMLInputNumber.valueAsNumber's behavior. - assert_throws({ name: "TypeError" }, function() { input.valueAsNumber = objectValue; }); + assert_throws(new TypeError(), function() { input.valueAsNumber = objectValue; }); } }, "assigning { valueOf: function() { return " + desc + " } } to HTMLInputElement.valueAsNumber coerces the value to an IDL unrestricted double correctly"); } @@ -93,7 +93,7 @@ // ToPrimitive() will throw a TypeError if valueOf and toString both // return an object. Also, Infinity and -Infinity will throw according // to HTMLInputNumber.valueAsNumber's behavior. - assert_throws({ name: "TypeError" }, function() { input.valueAsNumber = objectValue; }); + assert_throws(new TypeError(), function() { input.valueAsNumber = objectValue; }); } }, "assigning { toString: function() { return " + desc + " } } to HTMLInputElement.valueAsNumber coerces the value to an IDL unrestricted double correctly"); } diff --git a/WebIDL/tests/submissions/heycam/unrestricted-double-002.html b/WebIDL/tests/submissions/heycam/unrestricted-double-002.html index cd5299615b6f6d..bcb0b523c6c399 100644 --- a/WebIDL/tests/submissions/heycam/unrestricted-double-002.html +++ b/WebIDL/tests/submissions/heycam/unrestricted-double-002.html @@ -67,7 +67,7 @@ assert_equals(a[0], expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { a[0] = objectValue; }); + assert_throws(new TypeError(), function() { a[0] = objectValue; }); } }, "passing { valueOf: function() { return " + desc + " } } through a Float64Array indexed property setter coerces the value to an IDL unrestricted double correctly"); } @@ -83,7 +83,7 @@ assert_equals(a[0], expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { a[0] = objectValue; }); + assert_throws(new TypeError(), function() { a[0] = objectValue; }); } }, "passing { toString: function() { return " + desc + " } } through a Float64Array indexed property setter coerces the value to an IDL unrestricted double correctly"); } diff --git a/WebIDL/tests/submissions/heycam/unrestricted-float-001.html b/WebIDL/tests/submissions/heycam/unrestricted-float-001.html index af80709f09b6bb..ab0466c03fc09a 100644 --- a/WebIDL/tests/submissions/heycam/unrestricted-float-001.html +++ b/WebIDL/tests/submissions/heycam/unrestricted-float-001.html @@ -67,7 +67,7 @@ assert_equals(a[0], expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { a[0] = objectValue; }); + assert_throws(new TypeError(), function() { a[0] = objectValue; }); } }, "passing { valueOf: function() { return " + desc + " } } through a Float32Array indexed property setter coerces the value to an IDL unrestricted float correctly"); } @@ -83,7 +83,7 @@ assert_equals(a[0], expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { a[0] = objectValue; }); + assert_throws(new TypeError(), function() { a[0] = objectValue; }); } }, "passing { toString: function() { return " + desc + " } } through a Float32Array indexed property setter coerces the value to an IDL unrestricted float correctly"); } diff --git a/WebIDL/tests/submissions/heycam/unsigned-long-001.html b/WebIDL/tests/submissions/heycam/unsigned-long-001.html index a26c565a4bd87f..894dbdd33d1cff 100644 --- a/WebIDL/tests/submissions/heycam/unsigned-long-001.html +++ b/WebIDL/tests/submissions/heycam/unsigned-long-001.html @@ -62,7 +62,7 @@ assert_equals(it.whatToShow, expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { document.createNodeIterator(document, objectValue, null); }); + assert_throws(new TypeError(), function() { document.createNodeIterator(document, objectValue, null); }); } }, "passing { valueOf: function() { return " + desc + " } } to Document.createNodeIterator coerces the value to an IDL unsigned long correctly"); } @@ -78,7 +78,7 @@ assert_equals(it.whatToShow, expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { document.createNodeIterator(document, objectValue, null); }); + assert_throws(new TypeError(), function() { document.createNodeIterator(document, objectValue, null); }); } }, "passing { toString: function() { return " + desc + " } } to Document.createNodeIterator coerces the value to an IDL unsigned long correctly"); } diff --git a/WebIDL/tests/submissions/heycam/unsigned-long-002.html b/WebIDL/tests/submissions/heycam/unsigned-long-002.html index ae341b02eb4d5e..33f1967e7cebff 100644 --- a/WebIDL/tests/submissions/heycam/unsigned-long-002.html +++ b/WebIDL/tests/submissions/heycam/unsigned-long-002.html @@ -62,7 +62,7 @@ assert_equals(e.deltaMode, expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { new WheelEvent("test", { deltaMode: objectValue }); }); + assert_throws(new TypeError(), function() { new WheelEvent("test", { deltaMode: objectValue }); }); } }, "passing { valueOf: function() { return " + desc + " } } through WheelEvent constructor coerces the value to an IDL unsigned long correctly"); } @@ -78,7 +78,7 @@ assert_equals(e.deltaMode, expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { new WheelEvent("test", { deltaMode: objectValue }); }); + assert_throws(new TypeError(), function() { new WheelEvent("test", { deltaMode: objectValue }); }); } }, "passing { toString: function() { return " + desc + " } } through WheelEvent constructor coerces the value to an IDL unsigned long correctly"); } diff --git a/WebIDL/tests/submissions/heycam/unsigned-short-001.html b/WebIDL/tests/submissions/heycam/unsigned-short-001.html index e70fcb43a77e0a..a4cc90bbd87f30 100644 --- a/WebIDL/tests/submissions/heycam/unsigned-short-001.html +++ b/WebIDL/tests/submissions/heycam/unsigned-short-001.html @@ -61,7 +61,7 @@ assert_equals(e.code, expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { new CloseEvent("test", { code: objectValue }); }); + assert_throws(new TypeError(), function() { new CloseEvent("test", { code: objectValue }); }); } }, "passing { valueOf: function() { return " + desc + " } } to CloseEvent constructor coerces the value to an IDL unsigned short correctly"); } @@ -77,7 +77,7 @@ assert_equals(e.code, expected); } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { new CloseEvent("test", { code: objectValue }); }); + assert_throws(new TypeError(), function() { new CloseEvent("test", { code: objectValue }); }); } }, "passing { toString: function() { return " + desc + " } } to CloseEvent constructor coerces the value to an IDL unsigned short correctly"); } diff --git a/WebIDL/tests/submissions/heycam/unsigned-short-002.html b/WebIDL/tests/submissions/heycam/unsigned-short-002.html index cfd39b4e8329b9..7c57d8c103ef86 100644 --- a/WebIDL/tests/submissions/heycam/unsigned-short-002.html +++ b/WebIDL/tests/submissions/heycam/unsigned-short-002.html @@ -119,7 +119,7 @@ } } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { rangePairs[0].a.compareBoundaryPoints(objectValue, rangePairs[0].b); }); + assert_throws(new TypeError(), function() { rangePairs[0].a.compareBoundaryPoints(objectValue, rangePairs[0].b); }); } }, "passing { valueOf: function() { return " + desc + " } } as the \"how\" argument of Range.compareBoundaryPoints() coerces the value to an IDL unsigned short correctly"); } @@ -140,7 +140,7 @@ } } else { // ToPrimitive() will throw a TypeError if valueOf and toString both return an object. - assert_throws({ name: "TypeError" }, function() { rangePairs[0].a.compareBoundaryPoints(objectValue, rangePairs[0].b); }); + assert_throws(new TypeError(), function() { rangePairs[0].a.compareBoundaryPoints(objectValue, rangePairs[0].b); }); } }, "passing { toString: function() { return " + desc + " } } as the \"how\" argument of Range.compareBoundaryPoints() coerces the value to an IDL unsigned short correctly"); } From 5957d1bacc391f522ad01c0393799ac6225ea921 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sat, 11 May 2013 12:59:18 +1000 Subject: [PATCH 064/116] Add a second static operation. --- WebIDL/tests/submissions/heycam/functions-001.html | 1 + WebIDL/tests/submissions/heycam/initial-001.html | 1 + 2 files changed, 2 insertions(+) diff --git a/WebIDL/tests/submissions/heycam/functions-001.html b/WebIDL/tests/submissions/heycam/functions-001.html index 38eefa76bf06d7..450d5a653d04b4 100644 --- a/WebIDL/tests/submissions/heycam/functions-001.html +++ b/WebIDL/tests/submissions/heycam/functions-001.html @@ -44,6 +44,7 @@ // static operation staticOperation("URL", "createObjectURL"), "URL.createObjectURL static function", + staticOperation("CSS", "supports"), "CSS.supports static function", // stringifier function stringifier("DOMTokenList"), "DOMTokenList stringifier function", diff --git a/WebIDL/tests/submissions/heycam/initial-001.html b/WebIDL/tests/submissions/heycam/initial-001.html index bcdd3b9ed4cdfa..6bb960ebcbe383 100644 --- a/WebIDL/tests/submissions/heycam/initial-001.html +++ b/WebIDL/tests/submissions/heycam/initial-001.html @@ -54,6 +54,7 @@ // static operation function staticOperation("URL", "createObjectURL"), staticOperation("URL", "createObjectURL", w), "URL.createObjectURL function", + staticOperation("CSS", "supports"), staticOperation("CSS", "supports", w), "CSS.supports function", // stringifier function stringifier("DOMTokenList"), stringifier("DOMTokenList", w), "DOMTokenList stringifier function", From 18d8c7b0e8174cf12ff65beaa2fc5777dbd2106e Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sat, 11 May 2013 13:00:23 +1000 Subject: [PATCH 065/116] Some more default argument subtests. --- .../submissions/heycam/operation-002.html | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/WebIDL/tests/submissions/heycam/operation-002.html b/WebIDL/tests/submissions/heycam/operation-002.html index 7fc5247d94aece..c03a7751cb37cb 100644 --- a/WebIDL/tests/submissions/heycam/operation-002.html +++ b/WebIDL/tests/submissions/heycam/operation-002.html @@ -69,4 +69,91 @@ test(function() { assert_throws(new TypeError(), function() { document.implementation.createHTMLDocument.call(document); }); }, "DOMImplementation.createHTMLDocument throws a TypeError when called with a bad this-value"); + + +function makeDivSpan(doc) { + var div = doc.createElement("div"); + div.appendChild(doc.createElement("span")); + return div; +} + +test(function() { + var div = makeDivSpan(document); + assert_equals(div.cloneNode(false, "extra").firstChild, null); +}, "extra argument passed to Node.cloneNode is ignored"); + +test(function() { + var div = makeDivSpan(document); + assert_true(!!div.cloneNode().firstChild); +}, "optional argument filled in correctly when calling Node.cloneNode"); + +test(function() { + var div = makeDivSpan(document); + assert_equals(div.cloneNode(undefined).firstChild, null); +}, "passing undefined to Node.cloneNode is correctly converted to an IDL boolean"); + +test(function() { + var div = makeDivSpan(document.getElementById("iframe").contentDocument); + Node.prototype.cloneNode.call(div); + assert_true(!!div.firstChild); +}, "Node.cloneNode can be applied to objects from other windows"); + +test(function() { + assert_throws(new TypeError(), function() { Node.prototype.cloneNode.call(null); }); +}, "Node.cloneNode throws a TypeError when called with a null this-value"); + +test(function() { + assert_throws(new TypeError(), function() { Node.prototype.cloneNode.call(new Range()); }); +}, "Node.cloneNode throws a TypeError when called with a bad this-value"); + + +function makeSelectOption(doc) { + var select = doc.createElement("select"); + select.appendChild(doc.createElement("option")); + return select; +} + +test(function() { + var select = makeSelectOption(document); + assert_throws(new TypeError(), function() { select.add(); }); +}, "passing too few arguments to HTMLSelectElement.add throws"); + +test(function() { + var select = makeSelectOption(document); + var option = document.createElement("option"); + select.add(option, null, "extra"); + assert_equals(select.lastChild, option); +}, "extra argument passed to HTMLSelectElement.add is ignored"); + +test(function() { + var select = makeSelectOption(document); + var option = document.createElement("option"); + select.add(option); + assert_equals(select.lastChild, option); +}, "optional argument filled in correctly when calling HTMLSelectElement.add"); + +test(function() { + var select = makeSelectOption(document); + var option = document.createElement("option"); + select.add(option, undefined); + assert_equals(select.lastChild, option); +}, "passing undefined to HTMLSelectElement.add is correctly converted to an IDL \"(HTMLElement or long)?\" type"); + +test(function() { + var doc = document.getElementById("iframe").contentDocument; + var select = makeSelectOption(doc); + var option = doc.createElement("option"); + HTMLSelectElement.prototype.add.call(select, option, select.firstChild); + assert_equals(select.firstChild, option); +}, "HTMLSelectElement.add can be applied to objects from other windows"); + +test(function() { + var option = document.createElement("option"); + assert_throws(new TypeError(), function() { HTMLSelectElement.protoype.add.call(null, { toString: function() { throw "something"; } }); }); +}, "HTMLSelectElement.add throws a TypeError when called with a null this-value"); + +test(function() { + var option = document.createElement("option"); + assert_throws(new TypeError(), function() { HTMLSelectElement.protoype.add.call(document, { toString: function() { throw "something"; } }); }); +}, "HTMLSelectElement.add throws a TypeError when called with a bad this-value"); From 9fbe3210384c3324e8af33dd38c1b756a35eb7f7 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sat, 11 May 2013 13:00:39 +1000 Subject: [PATCH 066/116] Change Document.write test to DOMTokenList.add. --- WebIDL/tests/submissions/heycam/operation-001.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebIDL/tests/submissions/heycam/operation-001.html b/WebIDL/tests/submissions/heycam/operation-001.html index c2b66906426153..2ffc9a928c5a1a 100644 --- a/WebIDL/tests/submissions/heycam/operation-001.html +++ b/WebIDL/tests/submissions/heycam/operation-001.html @@ -16,7 +16,7 @@ var operations = [ "HTMLElement", "click", 0, "Node", "appendChild", 1, - "Document", "write", 0, + "DOMTokenList", "add", 0, "Window", "setTimeout", 1, "Window", "postMessage", 2, "DOMImplementation", "createHTMLDocument", 0, From 27d9dd8bec36745f55b50d58b6eba13c14a840c8 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sat, 11 May 2013 13:01:03 +1000 Subject: [PATCH 067/116] Tests for varaidic and overloaded regular operations. --- WebIDL/tests/submissions/heycam/manifest.txt | 4 + .../submissions/heycam/operation-003.html | 84 +++++++++ .../submissions/heycam/operation-004.html | 172 ++++++++++++++++++ 3 files changed, 260 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/operation-003.html create mode 100644 WebIDL/tests/submissions/heycam/operation-004.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index e42b036e7921a6..c3d725494f9b12 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -71,6 +71,10 @@ object-001.html object-002.html octet-001.html octet-002.html +operation-001.html +operation-002.html +operation-003.html +operation-004.html sequence-001.html sequence-002.html short-001.html diff --git a/WebIDL/tests/submissions/heycam/operation-003.html b/WebIDL/tests/submissions/heycam/operation-003.html new file mode 100644 index 00000000000000..6cf8dd8e61ba5b --- /dev/null +++ b/WebIDL/tests/submissions/heycam/operation-003.html @@ -0,0 +1,84 @@ + +Invoking regular, variadic operations + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/operation-004.html b/WebIDL/tests/submissions/heycam/operation-004.html new file mode 100644 index 00000000000000..32964644ea322e --- /dev/null +++ b/WebIDL/tests/submissions/heycam/operation-004.html @@ -0,0 +1,172 @@ + +Invoking regular operations with overloading + + + +
+ + + + From 206d746f588cf64e2107433280d7f850a1931aee Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sat, 11 May 2013 13:13:05 +1000 Subject: [PATCH 068/116] Add second stringifier. --- WebIDL/tests/submissions/heycam/functions-001.html | 1 + WebIDL/tests/submissions/heycam/initial-001.html | 1 + 2 files changed, 2 insertions(+) diff --git a/WebIDL/tests/submissions/heycam/functions-001.html b/WebIDL/tests/submissions/heycam/functions-001.html index 450d5a653d04b4..f55b882b38d56f 100644 --- a/WebIDL/tests/submissions/heycam/functions-001.html +++ b/WebIDL/tests/submissions/heycam/functions-001.html @@ -48,6 +48,7 @@ // stringifier function stringifier("DOMTokenList"), "DOMTokenList stringifier function", + stringifier("HTMLAnchorElement"), "HTMLAnchorElement stringifier function", // exception interface object interfaceObject("DOMException"), "DOMException exception interface object", diff --git a/WebIDL/tests/submissions/heycam/initial-001.html b/WebIDL/tests/submissions/heycam/initial-001.html index 6bb960ebcbe383..20c972c6ebedce 100644 --- a/WebIDL/tests/submissions/heycam/initial-001.html +++ b/WebIDL/tests/submissions/heycam/initial-001.html @@ -58,6 +58,7 @@ // stringifier function stringifier("DOMTokenList"), stringifier("DOMTokenList", w), "DOMTokenList stringifier function", + stringifier("HTMLAnchorElement"), stringifier("HTMLAnchorElement", w), "HTMLAnchorElement stringifier function", // exception interface object interfaceObject("DOMException"), interfaceObject("DOMException", w), "DOMException exception interface object", From 3ee072229b2e18f3f9f9f8b79bf714ca1197f707 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sat, 11 May 2013 15:31:11 +1000 Subject: [PATCH 069/116] Add tests for stringifiers. --- WebIDL/tests/submissions/heycam/manifest.txt | 2 + .../submissions/heycam/stringifier-001.html | 29 +++++++++++ .../submissions/heycam/stringifier-002.html | 52 +++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/stringifier-001.html create mode 100644 WebIDL/tests/submissions/heycam/stringifier-002.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index c3d725494f9b12..75629e7ca5a066 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -79,6 +79,8 @@ sequence-001.html sequence-002.html short-001.html short-002.html +stringifier-001.html +stringifier-002.html union-001.html unrestricted-double-001.html unrestricted-double-002.html diff --git a/WebIDL/tests/submissions/heycam/stringifier-001.html b/WebIDL/tests/submissions/heycam/stringifier-001.html new file mode 100644 index 00000000000000..37a87e009e20f8 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/stringifier-001.html @@ -0,0 +1,29 @@ + +Stringifiers + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/stringifier-002.html b/WebIDL/tests/submissions/heycam/stringifier-002.html new file mode 100644 index 00000000000000..0b6ff79b57435f --- /dev/null +++ b/WebIDL/tests/submissions/heycam/stringifier-002.html @@ -0,0 +1,52 @@ + +Stringifiers on attributes + + + +
+ + From b6c4f2f55c7c76adf34a00f5d89cd1ac9e7d43da Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sat, 11 May 2013 15:41:26 +1000 Subject: [PATCH 070/116] Add test for implements statement. --- .../submissions/heycam/implements-001.html | 21 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 22 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/implements-001.html diff --git a/WebIDL/tests/submissions/heycam/implements-001.html b/WebIDL/tests/submissions/heycam/implements-001.html new file mode 100644 index 00000000000000..ac66b6bcdbd24a --- /dev/null +++ b/WebIDL/tests/submissions/heycam/implements-001.html @@ -0,0 +1,21 @@ + +Implements statements + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 75629e7ca5a066..3d1a04710c2a98 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -52,6 +52,7 @@ float-001.html float-002.html float-003.html functions-001.html +implements-001.html initial-001.html initial-002.html interface-001.html From f6b176960d45cb545bf425f6af68bf9156d919df Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sat, 11 May 2013 16:33:06 +1000 Subject: [PATCH 071/116] Add tests for Object.freeze() etc. failing on objects that support indexed/named properties. --- .../heycam/NamedPropertiesObject-004.html | 38 ++++++++++++++ .../heycam/indexed-properties-001.html | 45 +++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 3 ++ .../heycam/named-properties-001.html | 49 +++++++++++++++++++ 4 files changed, 135 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/NamedPropertiesObject-004.html create mode 100644 WebIDL/tests/submissions/heycam/indexed-properties-001.html create mode 100644 WebIDL/tests/submissions/heycam/named-properties-001.html diff --git a/WebIDL/tests/submissions/heycam/NamedPropertiesObject-004.html b/WebIDL/tests/submissions/heycam/NamedPropertiesObject-004.html new file mode 100644 index 00000000000000..5398ef10447c47 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/NamedPropertiesObject-004.html @@ -0,0 +1,38 @@ + +Fixing the named properties object + + + +
+ +
+ + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/indexed-properties-001.html b/WebIDL/tests/submissions/heycam/indexed-properties-001.html new file mode 100644 index 00000000000000..6369325f548251 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/indexed-properties-001.html @@ -0,0 +1,45 @@ + +Fixing objects that support indexed properties + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 3d1a04710c2a98..86ffaf1175b588 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -14,6 +14,7 @@ NamedConstructor-001.html NamedPropertiesObject-001.html NamedPropertiesObject-002.html NamedPropertiesObject-003.html +NamedPropertiesObject-004.html NoInterfaceObject-001.html OverrideBuiltins-001.html OverrideBuiltins-002.html @@ -53,6 +54,7 @@ float-002.html float-003.html functions-001.html implements-001.html +indexed-properties-001.html initial-001.html initial-002.html interface-001.html @@ -65,6 +67,7 @@ interface-type-004.html long-001.html long-002.html long-003.html +named-properties-001.html nullable-001.html nullable-002.html nullable-003.html diff --git a/WebIDL/tests/submissions/heycam/named-properties-001.html b/WebIDL/tests/submissions/heycam/named-properties-001.html new file mode 100644 index 00000000000000..1eeed812a3b906 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/named-properties-001.html @@ -0,0 +1,49 @@ + +Fixing objects that support named properties + + + +
+ + + + From a15b3ece8dfbc8842c80568c6bce2673a7aac010 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sat, 11 May 2013 17:33:45 +1000 Subject: [PATCH 072/116] Add tests for getting indexed and named properties. --- .../heycam/indexed-properties-002.html | 73 +++++++ WebIDL/tests/submissions/heycam/manifest.txt | 2 + .../heycam/named-properties-002.html | 196 ++++++++++++++++++ 3 files changed, 271 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/indexed-properties-002.html create mode 100644 WebIDL/tests/submissions/heycam/named-properties-002.html diff --git a/WebIDL/tests/submissions/heycam/indexed-properties-002.html b/WebIDL/tests/submissions/heycam/indexed-properties-002.html new file mode 100644 index 00000000000000..d249169b34f215 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/indexed-properties-002.html @@ -0,0 +1,73 @@ + +Indexed properties + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 86ffaf1175b588..befeed387446cf 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -55,6 +55,7 @@ float-003.html functions-001.html implements-001.html indexed-properties-001.html +indexed-properties-002.html initial-001.html initial-002.html interface-001.html @@ -68,6 +69,7 @@ long-001.html long-002.html long-003.html named-properties-001.html +named-properties-002.html nullable-001.html nullable-002.html nullable-003.html diff --git a/WebIDL/tests/submissions/heycam/named-properties-002.html b/WebIDL/tests/submissions/heycam/named-properties-002.html new file mode 100644 index 00000000000000..87224556e03985 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/named-properties-002.html @@ -0,0 +1,196 @@ + +Named properties + + + +
+ + + + From 00f1b72fd276803d873eef8212d4f8f64a019ffc Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 12 May 2013 13:59:21 +1000 Subject: [PATCH 073/116] Add tests for setting indexed/named properties. --- .../heycam/indexed-properties-003.html | 134 ++++++++++++++++++ .../heycam/indexed-properties-004.html | 62 ++++++++ .../heycam/indexed-properties-005.html | 81 +++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 5 + .../heycam/named-properties-003.html | 90 ++++++++++++ .../heycam/named-properties-004.html | 77 ++++++++++ 6 files changed, 449 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/indexed-properties-003.html create mode 100644 WebIDL/tests/submissions/heycam/indexed-properties-004.html create mode 100644 WebIDL/tests/submissions/heycam/indexed-properties-005.html create mode 100644 WebIDL/tests/submissions/heycam/named-properties-003.html create mode 100644 WebIDL/tests/submissions/heycam/named-properties-004.html diff --git a/WebIDL/tests/submissions/heycam/indexed-properties-003.html b/WebIDL/tests/submissions/heycam/indexed-properties-003.html new file mode 100644 index 00000000000000..c8e4403917e934 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/indexed-properties-003.html @@ -0,0 +1,134 @@ + +Setting indexed properties + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/indexed-properties-004.html b/WebIDL/tests/submissions/heycam/indexed-properties-004.html new file mode 100644 index 00000000000000..1c763480671542 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/indexed-properties-004.html @@ -0,0 +1,62 @@ + +Setting indexed properties + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/indexed-properties-005.html b/WebIDL/tests/submissions/heycam/indexed-properties-005.html new file mode 100644 index 00000000000000..92134fd9ebd916 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/indexed-properties-005.html @@ -0,0 +1,81 @@ + +Setting indexed properties + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index befeed387446cf..95ebc540bab510 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -56,6 +56,9 @@ functions-001.html implements-001.html indexed-properties-001.html indexed-properties-002.html +indexed-properties-003.html +indexed-properties-004.html +indexed-properties-005.html initial-001.html initial-002.html interface-001.html @@ -70,6 +73,8 @@ long-002.html long-003.html named-properties-001.html named-properties-002.html +named-properties-003.html +named-properties-004.html nullable-001.html nullable-002.html nullable-003.html diff --git a/WebIDL/tests/submissions/heycam/named-properties-003.html b/WebIDL/tests/submissions/heycam/named-properties-003.html new file mode 100644 index 00000000000000..35d7640b4c4095 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/named-properties-003.html @@ -0,0 +1,90 @@ + +Setting named properties + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/named-properties-004.html b/WebIDL/tests/submissions/heycam/named-properties-004.html new file mode 100644 index 00000000000000..2cbff709d0ca14 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/named-properties-004.html @@ -0,0 +1,77 @@ + +Setting named properties + + + +
+ + From c970b7954dd4cc7fb6622ddbbe5a07f34c19ef64 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 12 May 2013 14:26:30 +1000 Subject: [PATCH 074/116] Add test for deleting named properties. --- WebIDL/tests/submissions/heycam/manifest.txt | 1 + .../heycam/named-properties-005.html | 45 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/named-properties-005.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 95ebc540bab510..f59b704b8bb76e 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -75,6 +75,7 @@ named-properties-001.html named-properties-002.html named-properties-003.html named-properties-004.html +named-properties-005.html nullable-001.html nullable-002.html nullable-003.html diff --git a/WebIDL/tests/submissions/heycam/named-properties-005.html b/WebIDL/tests/submissions/heycam/named-properties-005.html new file mode 100644 index 00000000000000..d8ebe3df162599 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/named-properties-005.html @@ -0,0 +1,45 @@ + +Deleting named properties + + + +
+ + From 478b74efe080e854297365bc36832089aa710199 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 12 May 2013 15:04:28 +1000 Subject: [PATCH 075/116] Add test for legacycaller. --- .../submissions/heycam/legacy-caller-001.html | 28 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 29 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/legacy-caller-001.html diff --git a/WebIDL/tests/submissions/heycam/legacy-caller-001.html b/WebIDL/tests/submissions/heycam/legacy-caller-001.html new file mode 100644 index 00000000000000..4a4233a7aa565c --- /dev/null +++ b/WebIDL/tests/submissions/heycam/legacy-caller-001.html @@ -0,0 +1,28 @@ + +Legacy callers + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index f59b704b8bb76e..3d53589807b41c 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -68,6 +68,7 @@ interface-type-001.html interface-type-002.html interface-type-003.html interface-type-004.html +legacy-caller-001.html long-001.html long-002.html long-003.html From ccf8ee0f8ed02f66e6400c60d2fc0b3a76a41e4c Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 12 May 2013 15:04:40 +1000 Subject: [PATCH 076/116] Add test for property enumeration order. --- WebIDL/tests/submissions/heycam/manifest.txt | 1 + .../heycam/property-enumeration-001.html | 103 ++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/property-enumeration-001.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 3d53589807b41c..5f3b70d9c1e0df 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -88,6 +88,7 @@ operation-001.html operation-002.html operation-003.html operation-004.html +property-enumeration-001.html sequence-001.html sequence-002.html short-001.html diff --git a/WebIDL/tests/submissions/heycam/property-enumeration-001.html b/WebIDL/tests/submissions/heycam/property-enumeration-001.html new file mode 100644 index 00000000000000..a01488abe4935f --- /dev/null +++ b/WebIDL/tests/submissions/heycam/property-enumeration-001.html @@ -0,0 +1,103 @@ + +Property enumeration + + + +
+ + + + From 4664876e53438a50acfb0b92f0a15e443d207e68 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 12 May 2013 15:29:34 +1000 Subject: [PATCH 077/116] Remove unnecessary markup. --- .../tests/submissions/heycam/callback-function-type-003.html | 4 ---- 1 file changed, 4 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/callback-function-type-003.html b/WebIDL/tests/submissions/heycam/callback-function-type-003.html index f74d14235c19be..2a75170797518f 100644 --- a/WebIDL/tests/submissions/heycam/callback-function-type-003.html +++ b/WebIDL/tests/submissions/heycam/callback-function-type-003.html @@ -5,10 +5,6 @@
- - diff --git a/WebIDL/tests/submissions/heycam/interface-object-002.html b/WebIDL/tests/submissions/heycam/interface-object-002.html index 3eb00948802420..83dce3049a2b96 100644 --- a/WebIDL/tests/submissions/heycam/interface-object-002.html +++ b/WebIDL/tests/submissions/heycam/interface-object-002.html @@ -1,5 +1,5 @@ -Interface object property for a callback interface +Interface object for a callback interface From 874a4d9074063b84f08e07fb415a703de6180c7e Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 12 May 2013 16:31:17 +1000 Subject: [PATCH 080/116] Tweak comment. --- WebIDL/tests/submissions/heycam/interface-001.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebIDL/tests/submissions/heycam/interface-001.html b/WebIDL/tests/submissions/heycam/interface-001.html index 160745c9f3336a..ad3bc7fb19358c 100644 --- a/WebIDL/tests/submissions/heycam/interface-001.html +++ b/WebIDL/tests/submissions/heycam/interface-001.html @@ -8,7 +8,7 @@ From 356900c5e77f553cc1a38f4ffc9c9a4a3d7560cf Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 12 May 2013 17:07:40 +1000 Subject: [PATCH 082/116] Add tests for exceptions. --- .../submissions/heycam/exception-001.html | 17 ++++++ .../exception-interface-object-001.html | 33 +++++++++++ .../exception-interface-object-002.html | 55 +++++++++++++++++++ ...eption-interface-prototype-object-001.html | 29 ++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 4 ++ 5 files changed, 138 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/exception-001.html create mode 100644 WebIDL/tests/submissions/heycam/exception-interface-object-001.html create mode 100644 WebIDL/tests/submissions/heycam/exception-interface-object-002.html create mode 100644 WebIDL/tests/submissions/heycam/exception-interface-prototype-object-001.html diff --git a/WebIDL/tests/submissions/heycam/exception-001.html b/WebIDL/tests/submissions/heycam/exception-001.html new file mode 100644 index 00000000000000..1accb9e07a38b8 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/exception-001.html @@ -0,0 +1,17 @@ + +Exception interface object property + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/exception-interface-object-001.html b/WebIDL/tests/submissions/heycam/exception-interface-object-001.html new file mode 100644 index 00000000000000..ed7d6df5374750 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/exception-interface-object-001.html @@ -0,0 +1,33 @@ + +Exception interface object + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/exception-interface-object-002.html b/WebIDL/tests/submissions/heycam/exception-interface-object-002.html new file mode 100644 index 00000000000000..63be79908b6c3b --- /dev/null +++ b/WebIDL/tests/submissions/heycam/exception-interface-object-002.html @@ -0,0 +1,55 @@ + +Exception interface object [[Call]] method + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/exception-interface-prototype-object-001.html b/WebIDL/tests/submissions/heycam/exception-interface-prototype-object-001.html new file mode 100644 index 00000000000000..79ad1ef002fbc6 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/exception-interface-prototype-object-001.html @@ -0,0 +1,29 @@ + +Exception interface prototype object + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 5f3b70d9c1e0df..8a2b26847cbc3a 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -48,6 +48,10 @@ double-001.html double-002.html double-003.html enum-type-001.html +exception-001.html +exception-interface-object-001.html +exception-interface-object-002.html +exception-interface-prototype-object-001.html extensible-001.html float-001.html float-002.html From d8d5d6479ce0820cf8a9717b7232e4b5e9a10c00 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 12 May 2013 17:14:53 +1000 Subject: [PATCH 083/116] Test for interface prototype objects. --- .../interface-prototype-object-001.html | 36 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 37 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/interface-prototype-object-001.html diff --git a/WebIDL/tests/submissions/heycam/interface-prototype-object-001.html b/WebIDL/tests/submissions/heycam/interface-prototype-object-001.html new file mode 100644 index 00000000000000..3819a7fffb8f8e --- /dev/null +++ b/WebIDL/tests/submissions/heycam/interface-prototype-object-001.html @@ -0,0 +1,36 @@ + +Exception interface object [[Call]] method + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 8a2b26847cbc3a..ca5f964dffe9da 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -68,6 +68,7 @@ initial-002.html interface-001.html interface-object-001.html interface-object-002.html +interface-protoype-object-001.html interface-type-001.html interface-type-002.html interface-type-003.html From 47255a8aa95126663098944bf72541db9b41718e Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 12 May 2013 17:40:07 +1000 Subject: [PATCH 084/116] Add test for exception fields. --- .../heycam/exception-field-001.html | 48 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 49 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/exception-field-001.html diff --git a/WebIDL/tests/submissions/heycam/exception-field-001.html b/WebIDL/tests/submissions/heycam/exception-field-001.html new file mode 100644 index 00000000000000..1fb892fffacf44 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/exception-field-001.html @@ -0,0 +1,48 @@ + +Exception fields + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index ca5f964dffe9da..e967965d99c79a 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -49,6 +49,7 @@ double-002.html double-003.html enum-type-001.html exception-001.html +exception-field-001.html exception-interface-object-001.html exception-interface-object-002.html exception-interface-prototype-object-001.html From 76568eba3c54efb9166ed7009e712a95f52e12a5 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 12 May 2013 17:58:27 +1000 Subject: [PATCH 085/116] Test for exception objects. --- .../heycam/exception-object-001.html | 23 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 2 files changed, 24 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/exception-object-001.html diff --git a/WebIDL/tests/submissions/heycam/exception-object-001.html b/WebIDL/tests/submissions/heycam/exception-object-001.html new file mode 100644 index 00000000000000..1f97bd0c496ded --- /dev/null +++ b/WebIDL/tests/submissions/heycam/exception-object-001.html @@ -0,0 +1,23 @@ + +Exception objects + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index e967965d99c79a..c1b0e52489a2bc 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -53,6 +53,7 @@ exception-field-001.html exception-interface-object-001.html exception-interface-object-002.html exception-interface-prototype-object-001.html +exception-object-001.html extensible-001.html float-001.html float-002.html From 3564cdf49f9e6a2a52b7018caa3416fc25eef07d Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 12 May 2013 17:58:50 +1000 Subject: [PATCH 086/116] Test for platform objects. --- WebIDL/tests/submissions/heycam/manifest.txt | 1 + .../heycam/platform-object-001.html | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/platform-object-001.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index c1b0e52489a2bc..aeca7fed108b9c 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -95,6 +95,7 @@ operation-001.html operation-002.html operation-003.html operation-004.html +platform-object-001.html property-enumeration-001.html sequence-001.html sequence-002.html diff --git a/WebIDL/tests/submissions/heycam/platform-object-001.html b/WebIDL/tests/submissions/heycam/platform-object-001.html new file mode 100644 index 00000000000000..47ecff4733af19 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/platform-object-001.html @@ -0,0 +1,29 @@ + +Platform objects implementing interfaces + + + +
+ + From 0bab1a9d37cb20123ef90bac82e2c43a1ad8a484 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Sun, 12 May 2013 18:23:09 +1000 Subject: [PATCH 087/116] Add test for exceptions being associated with the right global environment. --- WebIDL/tests/submissions/heycam/manifest.txt | 1 + .../submissions/heycam/throwing-001.html | 76 +++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/throwing-001.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index aeca7fed108b9c..f0022474735e96 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -103,6 +103,7 @@ short-001.html short-002.html stringifier-001.html stringifier-002.html +throwing-001.html union-001.html unrestricted-double-001.html unrestricted-double-002.html diff --git a/WebIDL/tests/submissions/heycam/throwing-001.html b/WebIDL/tests/submissions/heycam/throwing-001.html new file mode 100644 index 00000000000000..518039e0d4b824 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/throwing-001.html @@ -0,0 +1,76 @@ + +Throwing exceptions + + + +
+ + + + From 15f41853baf273588098bba70854c31c39ff43ad Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 13 May 2013 11:15:37 +1000 Subject: [PATCH 088/116] Annotate tests with which features they are using. --- .../submissions/heycam/ArrayClass-001.html | 2 + .../tests/submissions/heycam/Clamp-001.html | 4 ++ .../submissions/heycam/Constructor-001.html | 6 ++ .../submissions/heycam/Constructor-002.html | 4 ++ .../submissions/heycam/Constructor-003.html | 4 ++ .../submissions/heycam/Constructor-004.html | 4 ++ .../submissions/heycam/DOMString-001.html | 2 + .../submissions/heycam/DOMString-002.html | 2 + .../submissions/heycam/DOMString-003.html | 4 ++ WebIDL/tests/submissions/heycam/Date-001.html | 4 +- WebIDL/tests/submissions/heycam/Date-002.html | 2 + .../submissions/heycam/LenientThis-001.html | 4 ++ .../heycam/NamedConstructor-001.html | 4 ++ .../heycam/NamedPropertiesObject-001.html | 3 + .../heycam/NamedPropertiesObject-002.html | 2 + .../heycam/NamedPropertiesObject-003.html | 2 + .../heycam/NamedPropertiesObject-004.html | 2 + .../heycam/NoInterfaceObject-001.html | 4 ++ .../heycam/OverrideBuiltins-001.html | 2 + .../heycam/OverrideBuiltins-002.html | 2 + .../submissions/heycam/PutForwards-001.html | 4 ++ .../submissions/heycam/Replaceable-001.html | 4 ++ .../heycam/TreatNonCallableAsNull-001.html | 3 + .../submissions/heycam/TreatNullAs-001.html | 6 ++ .../submissions/heycam/TreatNullAs-002.html | 2 + .../submissions/heycam/Unforgeable-001.html | 4 ++ WebIDL/tests/submissions/heycam/any-001.html | 2 + .../submissions/heycam/attribute-001.html | 2 + .../submissions/heycam/attribute-002.html | 2 + .../submissions/heycam/attribute-003.html | 2 + .../submissions/heycam/attribute-004.html | 4 +- .../submissions/heycam/attribute-005.html | 2 + .../submissions/heycam/attribute-006.html | 2 + .../tests/submissions/heycam/boolean-001.html | 2 + .../tests/submissions/heycam/boolean-002.html | 4 ++ WebIDL/tests/submissions/heycam/byte-001.html | 2 + WebIDL/tests/submissions/heycam/byte-002.html | 2 + .../heycam/callback-function-type-001.html | 2 + .../heycam/callback-function-type-002.html | 2 + .../heycam/callback-function-type-003.html | 2 + .../submissions/heycam/class-string-001.html | 62 +++++++++++++++++++ .../submissions/heycam/constant-001.html | 4 ++ .../submissions/heycam/constant-002.html | 2 + .../submissions/heycam/constant-003.html | 2 + .../heycam/dictionary-type-001.html | 2 + .../heycam/dictionary-type-002.html | 2 + .../tests/submissions/heycam/double-001.html | 2 + .../tests/submissions/heycam/double-002.html | 2 + .../tests/submissions/heycam/double-003.html | 4 +- .../submissions/heycam/enum-type-001.html | 2 + .../submissions/heycam/exception-001.html | 2 + .../heycam/exception-field-001.html | 2 + .../exception-interface-object-001.html | 2 + .../exception-interface-object-002.html | 2 + ...eption-interface-prototype-object-001.html | 2 + .../heycam/exception-object-001.html | 2 + .../submissions/heycam/extensible-001.html | 62 +++++++++++++++++++ .../tests/submissions/heycam/float-001.html | 2 + .../tests/submissions/heycam/float-002.html | 2 + .../tests/submissions/heycam/float-003.html | 4 ++ .../submissions/heycam/functions-001.html | 41 ++++++++++++ .../submissions/heycam/implements-001.html | 2 + .../heycam/indexed-properties-001.html | 4 ++ .../heycam/indexed-properties-002.html | 4 ++ .../heycam/indexed-properties-003.html | 4 ++ .../heycam/indexed-properties-004.html | 2 + .../heycam/indexed-properties-005.html | 12 ++-- .../tests/submissions/heycam/initial-001.html | 55 ++++++++++++++++ .../tests/submissions/heycam/initial-002.html | 60 ++++++++++++++++++ .../submissions/heycam/interface-001.html | 18 +++++- .../heycam/interface-object-001.html | 4 ++ .../heycam/interface-object-002.html | 2 + .../interface-prototype-object-001.html | 8 +++ .../heycam/interface-type-001.html | 2 + .../heycam/interface-type-002.html | 2 + .../heycam/interface-type-003.html | 2 + .../heycam/interface-type-004.html | 4 ++ .../submissions/heycam/legacy-caller-001.html | 2 + WebIDL/tests/submissions/heycam/long-001.html | 2 + WebIDL/tests/submissions/heycam/long-002.html | 2 + WebIDL/tests/submissions/heycam/long-003.html | 4 ++ .../heycam/named-properties-001.html | 4 ++ .../heycam/named-properties-002.html | 4 +- .../heycam/named-properties-003.html | 2 + .../heycam/named-properties-004.html | 12 ++-- .../heycam/named-properties-005.html | 4 ++ .../submissions/heycam/nullable-001.html | 2 + .../submissions/heycam/nullable-002.html | 2 + .../submissions/heycam/nullable-003.html | 2 + .../tests/submissions/heycam/object-001.html | 2 + .../tests/submissions/heycam/object-002.html | 2 + .../tests/submissions/heycam/octet-001.html | 2 + .../tests/submissions/heycam/octet-002.html | 2 + .../submissions/heycam/operation-001.html | 21 +++++++ .../submissions/heycam/operation-002.html | 4 ++ .../submissions/heycam/operation-003.html | 4 ++ .../submissions/heycam/operation-004.html | 5 ++ .../heycam/platform-object-001.html | 8 +++ .../heycam/property-enumeration-001.html | 8 +++ .../submissions/heycam/sequence-001.html | 2 + .../submissions/heycam/sequence-002.html | 2 + .../tests/submissions/heycam/short-001.html | 2 + .../tests/submissions/heycam/short-002.html | 2 + .../submissions/heycam/stringifier-001.html | 4 ++ .../submissions/heycam/stringifier-002.html | 2 + .../submissions/heycam/throwing-001.html | 12 ++++ .../tests/submissions/heycam/union-001.html | 2 + .../heycam/unrestricted-double-001.html | 2 + .../heycam/unrestricted-double-002.html | 2 + .../heycam/unrestricted-double-003.html | 2 + .../heycam/unrestricted-double-004.html | 4 ++ .../heycam/unrestricted-float-001.html | 2 + .../heycam/unrestricted-float-002.html | 2 + .../submissions/heycam/unsigned-long-001.html | 2 + .../submissions/heycam/unsigned-long-002.html | 2 + .../submissions/heycam/unsigned-long-003.html | 4 ++ .../heycam/unsigned-short-001.html | 2 + .../heycam/unsigned-short-002.html | 2 + .../heycam/unsigned-short-003.html | 4 ++ WebIDL/tests/submissions/heycam/void-001.html | 4 ++ 120 files changed, 658 insertions(+), 14 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/ArrayClass-001.html b/WebIDL/tests/submissions/heycam/ArrayClass-001.html index 0241a73b673468..837184531f9258 100644 --- a/WebIDL/tests/submissions/heycam/ArrayClass-001.html +++ b/WebIDL/tests/submissions/heycam/ArrayClass-001.html @@ -10,6 +10,8 @@ // // [ArrayClass] on an interface means that its [[Prototype]] is Array.prototype. +// feature: NodeList (interface) (with [ArrayClass]) + test(function() { assert_true(NodeList.prototype == Array.prototype, "NodeList.prototype == Array.prototype"); }, "NodeList being [ArrayClass] implies NodeList.prototype == Array.prototype"); diff --git a/WebIDL/tests/submissions/heycam/Clamp-001.html b/WebIDL/tests/submissions/heycam/Clamp-001.html index 745bcf0282d961..897eba399ce5d5 100644 --- a/WebIDL/tests/submissions/heycam/Clamp-001.html +++ b/WebIDL/tests/submissions/heycam/Clamp-001.html @@ -11,6 +11,8 @@ // When [Clamp] is on an operation argument whose type is an integer type, then // values outside the range of the integer will be clamped to be valid. +// feature: Uint8ClampedArray (indexed property setter) (with [Clamp]) + test(function() { var a = new Uint8ClampedArray(1); a[0] = 128; @@ -36,6 +38,8 @@ assert_equals(a[0], 0); }, "correct conversion of Number values to a [Clamp]ed octet"); +// feature: WebSocket.close (operation) (with [Clamp] on an argument) + test(function() { var ws = new WebSocket("wss://test.invalid"); diff --git a/WebIDL/tests/submissions/heycam/Constructor-001.html b/WebIDL/tests/submissions/heycam/Constructor-001.html index 871e9aaa6bbdeb..1ee53e851f5792 100644 --- a/WebIDL/tests/submissions/heycam/Constructor-001.html +++ b/WebIDL/tests/submissions/heycam/Constructor-001.html @@ -13,10 +13,14 @@ // thrown. The returned object must implement the interface. There must // also be a "length" property on the interface object. +// feature: Element (interface) (without [Constructor]) + test(function() { assert_throws(new TypeError(), function() { new Element(); }, "new Element()"); }, "Calling new on an interface object whose interface does not have [Constructor]") +// feature: Event (interface) (with [Constructor]) + test(function() { assert_true(new Event("test") instanceof Event, "new Event(...) instanceof Event"); }, "Event constructor returns an object that is instanceof Event"); @@ -25,6 +29,8 @@ assert_true(Event("test") instanceof Event, "Event(...) instanceof Event"); }, "Event constructor called as a function returns an object that is instanceof Event"); +// feature: XMLHttpRequest (interface) (with [Constructor]) + test(function() { assert_true(new XMLHttpRequest() instanceof XMLHttpRequest, "new XMLHttpRequest() instanceof XMLHttpRequest"); }, "XMLHttpRequest constructor returns an object that is instanceof XMLHttpRequest"); diff --git a/WebIDL/tests/submissions/heycam/Constructor-002.html b/WebIDL/tests/submissions/heycam/Constructor-002.html index 1030b5e10d74d6..59cb500225239d 100644 --- a/WebIDL/tests/submissions/heycam/Constructor-002.html +++ b/WebIDL/tests/submissions/heycam/Constructor-002.html @@ -14,6 +14,8 @@ // ones are ignored. Argument types are not used to eliminate the single // entry in the effective overload set. +// feature: ArrayBuffer (interface) (with [Constructor], and no overloading or optional arguments) + test(function() { assert_throws(new TypeError(), function() { new ArrayBuffer(); }); }, "passing too few arguments to ArrayBuffer constructor throws"); @@ -28,6 +30,8 @@ assert_equals(buffer.byteLength, 10); }, "additional arguments passed to ArrayBuffer constructor are ignored"); +// feature: Range (interface) (with [Constructor], and no overloading or optional arguments) + test(function() { var range = new Range("test"); assert_true(!!range); diff --git a/WebIDL/tests/submissions/heycam/Constructor-003.html b/WebIDL/tests/submissions/heycam/Constructor-003.html index c377e3d8a86557..06421c6f2e86a8 100644 --- a/WebIDL/tests/submissions/heycam/Constructor-003.html +++ b/WebIDL/tests/submissions/heycam/Constructor-003.html @@ -16,6 +16,8 @@ // list length. Optional argument default values are also filled in for // trailing missing arguments. +// feature: Event (interface) (with [Constructor] and optional arguments) + test(function() { assert_throws(new TypeError(), function() { new Event(); }); }, "passing too few arguments to Event constructor throws"); @@ -36,6 +38,8 @@ assert_true(!!e); }, "extra arguments passed to Event constructor are ignored"); +// feature: WebSocket (interface) (with [Constructor] and optional arguments) + test(function() { assert_throws(new TypeError(), function() { new WebSocket(); }); }, "passing too few arguments to WebSocket constructor throws"); diff --git a/WebIDL/tests/submissions/heycam/Constructor-004.html b/WebIDL/tests/submissions/heycam/Constructor-004.html index 50dc01872add03..6c1370bfaedcc8 100644 --- a/WebIDL/tests/submissions/heycam/Constructor-004.html +++ b/WebIDL/tests/submissions/heycam/Constructor-004.html @@ -23,6 +23,8 @@ // are converted before possibly throwing due to an invalid value in that // argument position" since the distinguishing argument index is < 1. +// feature Uint8Array (interface) (with [Constructor] and overloading) + test(function() { assert_throws(new TypeError(), function() { new Uint8Array(); }); }, "passing too few arguments to Uint8Array constructor throws"); @@ -96,6 +98,8 @@ }, "passing (ArrayBuffer, undefined, undefined) to the Uint8Array constructor selects the (ArrayBuffer, optional unsigned long, optional unsigned long) overload with three arguments"); +// feature Blob (interface) (with [Constructor] and overloading) + test(function() { var b = new Blob(); assert_equals(b.size, 0); diff --git a/WebIDL/tests/submissions/heycam/DOMString-001.html b/WebIDL/tests/submissions/heycam/DOMString-001.html index 88693f7444d37d..1010dd0a98070e 100644 --- a/WebIDL/tests/submissions/heycam/DOMString-001.html +++ b/WebIDL/tests/submissions/heycam/DOMString-001.html @@ -55,6 +55,8 @@ span.classList, "abc def", "span.classList" ]; +// feature: Attr.value (attribute) (writable, of type DOMString) + for (var i = 0; i < values.length; i += 3) { var value = values[i]; var expected = values[i + 1]; diff --git a/WebIDL/tests/submissions/heycam/DOMString-002.html b/WebIDL/tests/submissions/heycam/DOMString-002.html index 54f4c7d7cd6f00..0cdb2e03069187 100644 --- a/WebIDL/tests/submissions/heycam/DOMString-002.html +++ b/WebIDL/tests/submissions/heycam/DOMString-002.html @@ -54,6 +54,8 @@ span.classList, "abc def", "span.classList" ]; +// feature: CharacterData.appendData (attribute) (writable, of type DOMString) + for (var i = 0; i < values.length; i += 3) { var value = values[i]; var expected = values[i + 1]; diff --git a/WebIDL/tests/submissions/heycam/DOMString-003.html b/WebIDL/tests/submissions/heycam/DOMString-003.html index 1843bc9d9bb39b..b0a5f35112e1ad 100644 --- a/WebIDL/tests/submissions/heycam/DOMString-003.html +++ b/WebIDL/tests/submissions/heycam/DOMString-003.html @@ -10,6 +10,8 @@ // // IDL DOMString values are represented with JS string values. +// feature: Attr.value (attribute) (of type DOMString) + test(function() { var e = document.createElement("span"); e.setAttribute("data-test", "test"); @@ -17,6 +19,8 @@ assert_equals(typeof a.value, "string"); }, "Attr.value returns a value of the correct type"); +// feature: Node.nodeName (attribute) (of type DOMString) + test(function() { assert_equals(typeof document.nodeName, "string"); }, "Node.nodeName returns a value of the correct type"); diff --git a/WebIDL/tests/submissions/heycam/Date-001.html b/WebIDL/tests/submissions/heycam/Date-001.html index 54e9f83340d4fb..5db2d85659dcf6 100644 --- a/WebIDL/tests/submissions/heycam/Date-001.html +++ b/WebIDL/tests/submissions/heycam/Date-001.html @@ -6,12 +6,14 @@
@@ -23,6 +23,8 @@ // from other windows. Calling it with a bad this object value will throw // a TypeError. +// feature: HTMLFormElement (attribute) (read only, without [Unforgeable]) + var form = document.getElementById("form"); test(function() { diff --git a/WebIDL/tests/submissions/heycam/attribute-005.html b/WebIDL/tests/submissions/heycam/attribute-005.html index 72f0e4b52ef844..53efc62fce16a7 100644 --- a/WebIDL/tests/submissions/heycam/attribute-005.html +++ b/WebIDL/tests/submissions/heycam/attribute-005.html @@ -20,6 +20,8 @@ // other windows. Calling it with a bad this object value will throw // a TypeError. +// feature: Document.title (attribute) (writable, without [Unforgeable]) + test(function() { var desc = Object.getOwnPropertyDescriptor(Document.prototype, "title"); assert_equals(typeof desc.set, "function"); diff --git a/WebIDL/tests/submissions/heycam/attribute-006.html b/WebIDL/tests/submissions/heycam/attribute-006.html index 3efc6bb5a79b1c..be0068cbff6828 100644 --- a/WebIDL/tests/submissions/heycam/attribute-006.html +++ b/WebIDL/tests/submissions/heycam/attribute-006.html @@ -24,6 +24,8 @@ // other windows. Calling it with a bad this object value will throw // a TypeError. +// feature: HTMLSelectElement.length (attribute) (writable, without [Unforgeable]) + var select = document.getElementById("select"); test(function() { diff --git a/WebIDL/tests/submissions/heycam/boolean-001.html b/WebIDL/tests/submissions/heycam/boolean-001.html index 4fc46469c7c898..49273e36d462e3 100644 --- a/WebIDL/tests/submissions/heycam/boolean-001.html +++ b/WebIDL/tests/submissions/heycam/boolean-001.html @@ -33,6 +33,8 @@ document, "document" ]; +// feature: Event.initEvent (operation) (with argument of type boolean) + for (var i = 0; i < values.length; i += 2) { var value = values[i]; var desc = values[i + 1]; diff --git a/WebIDL/tests/submissions/heycam/boolean-002.html b/WebIDL/tests/submissions/heycam/boolean-002.html index 1f0a901e69771a..e0711e546dccd9 100644 --- a/WebIDL/tests/submissions/heycam/boolean-002.html +++ b/WebIDL/tests/submissions/heycam/boolean-002.html @@ -10,11 +10,15 @@ // // IDL boolean values are represented as JS Boolean values. +// feature: Event.bubbles (attribute) (of type boolean) + test(function() { var e = document.createEvent("Event"); assert_equals(typeof e.bubbles, "boolean"); }, "Event.bubbles returns a value of the correct type"); +// feature: Document.hasFocus (operation) (with return type boolean) + test(function() { assert_equals(typeof document.hasFocus(), "boolean"); }, "Document.hasFocus() returns a value of the correct type"); diff --git a/WebIDL/tests/submissions/heycam/byte-001.html b/WebIDL/tests/submissions/heycam/byte-001.html index 07a89b6bcf1e56..e58696f71902d2 100644 --- a/WebIDL/tests/submissions/heycam/byte-001.html +++ b/WebIDL/tests/submissions/heycam/byte-001.html @@ -40,6 +40,8 @@ 1.5, 1, "1.5" ]; +// feature: Int8Array (indexed property setter) (of type byte) + var a = new Int8Array(1); for (var i = 0; i < values.length; i += 3) { diff --git a/WebIDL/tests/submissions/heycam/byte-002.html b/WebIDL/tests/submissions/heycam/byte-002.html index fd92a536ecf47b..7f491912d67be3 100644 --- a/WebIDL/tests/submissions/heycam/byte-002.html +++ b/WebIDL/tests/submissions/heycam/byte-002.html @@ -11,6 +11,8 @@ // IDL byte values are represented as integer JS Number values in the range // [-128, 127] +// feature: Int8Array (indexed property getter) (of type byte) + test(function() { var a = new Int8Array(1); assert_equals(typeof a[0], "number"); diff --git a/WebIDL/tests/submissions/heycam/callback-function-type-001.html b/WebIDL/tests/submissions/heycam/callback-function-type-001.html index 16c763c99df23e..3cf3e2c6f60086 100644 --- a/WebIDL/tests/submissions/heycam/callback-function-type-001.html +++ b/WebIDL/tests/submissions/heycam/callback-function-type-001.html @@ -10,6 +10,8 @@ // // Anything that isn't callable is a TypeError. +// feature: MutationObserver (interface) (with [Constructor] with argument of a callback function type) + async_test(function(t) { var invoked = false; var span = document.createElement("span"); diff --git a/WebIDL/tests/submissions/heycam/callback-function-type-002.html b/WebIDL/tests/submissions/heycam/callback-function-type-002.html index d1f37532e1cd22..45d9f9e1aaeed3 100644 --- a/WebIDL/tests/submissions/heycam/callback-function-type-002.html +++ b/WebIDL/tests/submissions/heycam/callback-function-type-002.html @@ -10,6 +10,8 @@ // // Anything that isn't callable is a TypeError. +// feature: GlobalEventHandlers.onclick (attribute) (writable, of a callback function type) + async_test(function(t) { var invoked = false; var span = document.createElement("span"); diff --git a/WebIDL/tests/submissions/heycam/callback-function-type-003.html b/WebIDL/tests/submissions/heycam/callback-function-type-003.html index 2a75170797518f..1584014c7eeed7 100644 --- a/WebIDL/tests/submissions/heycam/callback-function-type-003.html +++ b/WebIDL/tests/submissions/heycam/callback-function-type-003.html @@ -11,6 +11,8 @@ // IDL callback function types are represented as JS object references to // a callable object. +// feature: GlobalEventHandlers.onclick (attribute) (of a callback function type) + test(function() { var e = document.createElement("span"); e.onclick = function() { }; diff --git a/WebIDL/tests/submissions/heycam/class-string-001.html b/WebIDL/tests/submissions/heycam/class-string-001.html index 5c5f2eb1952ace..4410963da0d084 100644 --- a/WebIDL/tests/submissions/heycam/class-string-001.html +++ b/WebIDL/tests/submissions/heycam/class-string-001.html @@ -14,62 +14,120 @@ var objects = [ // interface object + + // feature: DOMImplementation (interface) (without inheritance, without [NoInterfaceObject]) interfaceObject("DOMImplementation"), "Function", "DOMImplementation interface object", + // feature: HTMLCollection (interface) (without inheritance, without [NoInterfaceObject]) interfaceObject("HTMLCollection"), "Function", "HTMLCollection interface object", + // interface object for inherited interface + + // feature: Element (interface) (with inheritance, without [NoInterfaceObject]) interfaceObject("Element"), "Function", "Element interface object", + // feature: UIEvent (interface) (with inheritance, without [NoInterfaceObject]) interfaceObject("UIEvent"), "Function", "UIEvent interface object", + // interface prototype object + + // feature: DOMImplementation (interface) (without inheritance) interfacePrototypeObject("DOMImplementation"), "DOMImplementationPrototype", "DOMImplementation interface prototype object", + // feature: HTMLCollection (interface) (without inheritance) interfacePrototypeObject("HTMLCollection"), "HTMLCollectionPrototype", "HTMLCollection interface prototype object", + // interface prototype object for inherited interface + + // feature: Element (interface) (with inheritance) interfacePrototypeObject("Element"), "ElementPrototype", "Element interface prototype object", + // feature: UIEvent (interface) (with inheritance) interfacePrototypeObject("UIEvent"), "UIEventPrototype", "UIEvent interface prototype object", + // named constructor object + + // feature: HTMLImageElement (interface) (with [NamedConstructor]) namedConstructorObject("Image"), "Function", "Image named constructor object", + // feature: HTMLAudioElement (interface) (with [NamedConstructor]) namedConstructorObject("Audio"), "Function", "Audio named constructor object", + // attribute getter + + // feature: Document.title (attribute) (writable) getter("Document", "title"), "Function", "Document.title attribute getter", + // feature: HTMLSelectElement.length (attribute) (writable) getter("HTMLSelectElement", "length"), "Function", "HTMLSelectElement.length attribute getter", + // read only attribute getter + + // feature: Node.parentNode (attribute) (read only) getter("Node", "parentNode"), "Function", "Node.parentNode attribute getter", + // feature: HTMLFormElement.length (attribute) (read only) getter("HTMLFormElement", "length"), "Function", "HTMLFormElement.length attribute getter", + // attribute setter + + // feature: Document.title (attribute) (writable) setter("Document", "title"), "Function", "Document.title attribute setter", + // feature: HTMLSelectElement.length (attribute) (writable) setter("HTMLSelectElement", "length"), "Function", "HTMLSelectElement.length attribute setter", + // operation function + + // feature: HTMLElement.click (operation) operation("HTMLElement", "click"), "Function", "HTMLElement.click function", + // feature: Node.appendChild (operation) operation("Node", "appendChild"), "Function", "Node.appendChild function", + // stringifier function + + // feature: DOMTokenList (stringifier) stringifier("DOMTokenList"), "Function", "DOMTokenList stringifier function", + // exception interface object + + // feature: DOMException (exception) (without [NoInterfaceObject]) interfaceObject("DOMException"), "Function", "DOMException exception interface object", + // exception interface prototype object + + // feature: DOMException (exception) interfacePrototypeObject("DOMException"), "DOMException", "DOMException exception interface prototype object", + // exception field getter + + // feature: DOMException.code (exception field) getter("DOMException", "code"), "Function", "DOMException.code exception field getter", + // platform object implementing an interface + + // feature: DOMImplementation (interface) (without inheritance, primary interface) function() { return document.implementation; }, "DOMImplementation", "a platform object implementing DOMImplementation", + // feature: HTMLCollection (interface) (without inheritance, primary interface) function() { return document.getElementsByTagName("div"); }, "HTMLCollection", "a platform object implementing HTMLCollection", + // platform object implementing an inherited interface + + // feature: HTMLDivElement (interface) (with inheritance, primary interface) function() { return document.createElement("div"); }, "HTMLDivElement", "a platform object implementing Element", + // feature: UIEvent (interface) (with inheritance, primary interface) function() { return document.createEvent("UIEvent"); }, "UIEvent", "a platform object implementing UIEvent", + // platform object representing an exception + + // feature: DOMException (exception) function() { try { document.appendChild(document); @@ -78,10 +136,14 @@ } }, "DOMException", "a platform object representing a DOMException", + // platform array object // XXX + // named properties object + + // feature: Window (interface) (with [NamedPropertiesObject]) function() { return Object.getPrototypeOf(Window.prototype); }, "WindowProperties", "named properties object" ]; diff --git a/WebIDL/tests/submissions/heycam/constant-001.html b/WebIDL/tests/submissions/heycam/constant-001.html index e86b51c02a2bd6..cb90a63aed5833 100644 --- a/WebIDL/tests/submissions/heycam/constant-001.html +++ b/WebIDL/tests/submissions/heycam/constant-001.html @@ -11,6 +11,8 @@ // Constants are exposed as non-writable, enumerable, non-configurable // properties on interface objects and interface prototype objects. +// feature: HTMLMediaElement.NETWORK_IDLE (constant) + test(function() { assert_property(HTMLMediaElement, "NETWORK_IDLE", { writable: false, enumerable: true, configurable: false, value: 1 }); }, "HTMLMediaElement.NETWORK_IDLE has correct attributes and value"); @@ -19,6 +21,8 @@ assert_property(HTMLMediaElement.prototype, "NETWORK_IDLE", { writable: false, enumerable: true, configurable: false, value: 1 }); }, "HTMLMediaElement.prototype.NETWORK_IDLE has correct attributes and value"); +// feature: SVGLength.SVG_LENGTHTYPE_NUMBER (constant) + test(function() { assert_property(SVGLength, "SVG_LENGTHTYPE_NUMBER", { writable: false, enumerable: true, configurable: false, value: 1 }); }, "SVGLength.SVG_LENGTHTYPE_NUMBER has correct attributes and value"); diff --git a/WebIDL/tests/submissions/heycam/constant-002.html b/WebIDL/tests/submissions/heycam/constant-002.html index ef07b11ebd5b3c..3ba02de7b8e4b9 100644 --- a/WebIDL/tests/submissions/heycam/constant-002.html +++ b/WebIDL/tests/submissions/heycam/constant-002.html @@ -11,6 +11,8 @@ // Constants on callback interfaces are exposed as non-writable, enumerable, // non-configurable properties on the interface object. +// feature: NodeFilter.SHOW_ALL (constant) (on a callback interface) + test(function() { assert_property(NodeFilter, "SHOW_ALL", { writable: false, enumerable: true, configurable: false, value: 0xFFFFFFFF }); }, "NodeFilter.SHOW_ALL has correct attributes and value"); diff --git a/WebIDL/tests/submissions/heycam/constant-003.html b/WebIDL/tests/submissions/heycam/constant-003.html index 7012e2f595e373..48f2a11f6dbdf8 100644 --- a/WebIDL/tests/submissions/heycam/constant-003.html +++ b/WebIDL/tests/submissions/heycam/constant-003.html @@ -12,6 +12,8 @@ // non-configurable properties on the exception interface object and // exception interface prototype. +// feature: DOMException.INVALID_STATE_ERR (constant) (on an exception) + test(function() { assert_property(DOMException, "INVALID_STATE_ERR", { writable: false, enumerable: true, configurable: false, value: 11 }); }, "DOMException.INVALID_STATE_ERR has correct attributes and value"); diff --git a/WebIDL/tests/submissions/heycam/dictionary-type-001.html b/WebIDL/tests/submissions/heycam/dictionary-type-001.html index b999c072a44fdb..94f3c936b82c35 100644 --- a/WebIDL/tests/submissions/heycam/dictionary-type-001.html +++ b/WebIDL/tests/submissions/heycam/dictionary-type-001.html @@ -20,6 +20,8 @@ // - using [[Get]] to get the value of each dictionary member, // in a specific order +// feature: CustomEvent (interface) (with constructor with argument of a dictionary type) + test(function() { var e = new CustomEvent("test", undefined); assert_true(!e.bubbles); diff --git a/WebIDL/tests/submissions/heycam/dictionary-type-002.html b/WebIDL/tests/submissions/heycam/dictionary-type-002.html index 9893b1870c4617..9eb14a90f1bc6e 100644 --- a/WebIDL/tests/submissions/heycam/dictionary-type-002.html +++ b/WebIDL/tests/submissions/heycam/dictionary-type-002.html @@ -17,6 +17,8 @@ // values that are present are own, writable, enumerable, configurable // properties on the object. +// feature: WebGLRenderingContext.getContextAttributes (operation) (with dictionary type return type) + test(function() { var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("webgl") || diff --git a/WebIDL/tests/submissions/heycam/double-001.html b/WebIDL/tests/submissions/heycam/double-001.html index eeb89555079939..9601ea6c281261 100644 --- a/WebIDL/tests/submissions/heycam/double-001.html +++ b/WebIDL/tests/submissions/heycam/double-001.html @@ -43,6 +43,8 @@ 1.0000001788139343, 1.0000001788139343, "1.0000001788139343" ]; +// feature: HTMLProgressElement.value (attribute) (writable, of type double) + var progress = document.createElement("progress"); for (var i = 0; i < values.length; i += 3) { diff --git a/WebIDL/tests/submissions/heycam/double-002.html b/WebIDL/tests/submissions/heycam/double-002.html index 516e020f75963a..2ac745b1e6bf53 100644 --- a/WebIDL/tests/submissions/heycam/double-002.html +++ b/WebIDL/tests/submissions/heycam/double-002.html @@ -43,6 +43,8 @@ 1.0000001788139343, 1.0000001788139343, "1.0000001788139343" ]; +// feature: HTMLMeterElement.min (attribute) (writable, of type double) + var meter = document.createElement("meter"); for (var i = 0; i < values.length; i += 3) { diff --git a/WebIDL/tests/submissions/heycam/double-003.html b/WebIDL/tests/submissions/heycam/double-003.html index 95264acdd22799..7d3b88f3666fc2 100644 --- a/WebIDL/tests/submissions/heycam/double-003.html +++ b/WebIDL/tests/submissions/heycam/double-003.html @@ -10,6 +10,8 @@ // // IDL double values are represented with finite JS Number values. +// feature: HTMLProgressElement.value (attribute) (of type double) + test(function() { var e = document.createElement("progress"); assert_equals(typeof e.value, "number"); @@ -20,5 +22,5 @@ var e = document.createElement("meter"); assert_equals(typeof e.min, "number"); assert_true(e.min * 0 == 0); -}, "HTMLMeterElement.value returns a value of the correct type"); +}, "HTMLMeterElement.min returns a value of the correct type"); diff --git a/WebIDL/tests/submissions/heycam/enum-type-001.html b/WebIDL/tests/submissions/heycam/enum-type-001.html index 6cf285d7a00d23..dde7f43511b4a0 100644 --- a/WebIDL/tests/submissions/heycam/enum-type-001.html +++ b/WebIDL/tests/submissions/heycam/enum-type-001.html @@ -15,6 +15,8 @@ // - throwing a TypeError if it not a valid enumerated value, except when // assigning to an attribute, in which case the assignment is ignored +// feature: CanvasRenderingContext2D.fill (operation, with argument of an enum type) + function drawAndGetPixel(rule) { var e = document.createElement("canvas"); e.width = 40; diff --git a/WebIDL/tests/submissions/heycam/exception-001.html b/WebIDL/tests/submissions/heycam/exception-001.html index 1accb9e07a38b8..09c9c7146d6be8 100644 --- a/WebIDL/tests/submissions/heycam/exception-001.html +++ b/WebIDL/tests/submissions/heycam/exception-001.html @@ -11,6 +11,8 @@ // For each interface object that isn't [NoInterfaceObject], there's a property // on the global object that is writable, unenumerable and configurable. +// feature: DOMException (exception) (without [NoInterfaceObject]) + test(function() { assert_property(window, "DOMException", { writable: true, enumerable: false, configurable: true }); }, "property for DOMException exception interface object exists"); diff --git a/WebIDL/tests/submissions/heycam/exception-field-001.html b/WebIDL/tests/submissions/heycam/exception-field-001.html index 1fb892fffacf44..7d4360831f6a3b 100644 --- a/WebIDL/tests/submissions/heycam/exception-field-001.html +++ b/WebIDL/tests/submissions/heycam/exception-field-001.html @@ -11,6 +11,8 @@ // Exception fields are exposed as accessor properties on the exception // interface prototype object. +// feature: DOMException.code (exception field) + test(function() { var desc = Object.getOwnPropertyDescriptor(DOMException.prototype, "code"); assert_descriptor(desc, { enumerable: true, configurable: true }); diff --git a/WebIDL/tests/submissions/heycam/exception-interface-object-001.html b/WebIDL/tests/submissions/heycam/exception-interface-object-001.html index ed7d6df5374750..4c15c6c8201b94 100644 --- a/WebIDL/tests/submissions/heycam/exception-interface-object-001.html +++ b/WebIDL/tests/submissions/heycam/exception-interface-object-001.html @@ -12,6 +12,8 @@ // property (non-writable, non-enumerable, non-configurable), since it is // a function object. Its value is the exception interface prototype object. +// feature: DOMException (exception) + test(function() { assert_property(DOMException, "prototype", { writable: false, enumerable: false, configurable: false }, "DOMException.prototype"); }, "DOMException.prototype has the right attributes"); diff --git a/WebIDL/tests/submissions/heycam/exception-interface-object-002.html b/WebIDL/tests/submissions/heycam/exception-interface-object-002.html index 63be79908b6c3b..e8e6dbe46c1e0c 100644 --- a/WebIDL/tests/submissions/heycam/exception-interface-object-002.html +++ b/WebIDL/tests/submissions/heycam/exception-interface-object-002.html @@ -11,6 +11,8 @@ // When called, exception interface objects construct and return a new // platform exception object. +// feature: DOMException (exception) + test(function() { var e = new DOMException(); assert_equals(Object.getPrototypeOf(e), DOMException.prototype); diff --git a/WebIDL/tests/submissions/heycam/exception-interface-prototype-object-001.html b/WebIDL/tests/submissions/heycam/exception-interface-prototype-object-001.html index 79ad1ef002fbc6..54e07bcb2e9a78 100644 --- a/WebIDL/tests/submissions/heycam/exception-interface-prototype-object-001.html +++ b/WebIDL/tests/submissions/heycam/exception-interface-prototype-object-001.html @@ -15,6 +15,8 @@ // has a "constructor" property pointing to the exception interface // object. +// feature: DOMException (exception) + test(function() { assert_equals(Object.getPrototypeOf(DOMException.prototype), Error.prototype); }, "DOMException.prototype has the right [[Prototype]]"); diff --git a/WebIDL/tests/submissions/heycam/exception-object-001.html b/WebIDL/tests/submissions/heycam/exception-object-001.html index 1f97bd0c496ded..de9fd2b396d337 100644 --- a/WebIDL/tests/submissions/heycam/exception-object-001.html +++ b/WebIDL/tests/submissions/heycam/exception-object-001.html @@ -11,6 +11,8 @@ // The [[Prototype]] of a platform object representing an exception is the // exception interface prototype object. +// feature: DOMException (exception) + test(function() { var exception; try { diff --git a/WebIDL/tests/submissions/heycam/extensible-001.html b/WebIDL/tests/submissions/heycam/extensible-001.html index fe46194d2f23bd..fb9bfb9170d7e1 100644 --- a/WebIDL/tests/submissions/heycam/extensible-001.html +++ b/WebIDL/tests/submissions/heycam/extensible-001.html @@ -14,62 +14,120 @@ var objects = [ // interface object + + // feature: DOMImplementation (interface) (without inheritance, without [NoInterfaceObject]) interfaceObject("DOMImplementation"), "DOMImplementation interface object", + // feature: HTMLCollection (interface) (without inheritance, without [NoInterfaceObject]) interfaceObject("HTMLCollection"), "HTMLCollection interface object", + // interface object for inherited interface + + // feature: Element (interface) (with inheritance, without [NoInterfaceObject]) interfaceObject("Element"), "Element interface object", + // feature: UIEvent (interface) (with inheritance, without [NoInterfaceObject]) interfaceObject("UIEvent"), "UIEvent interface object", + // interface prototype object + + // feature: DOMImplementation (interface) (without inheritance) interfacePrototypeObject("DOMImplementation"), "DOMImplementation interface prototype object", + // feature: HTMLCollection (interface) (without inheritance) interfacePrototypeObject("HTMLCollection"), "HTMLCollection interface prototype object", + // interface prototype object for inherited interface + + // feature: Element (interface) (with inheritance) interfacePrototypeObject("Element"), "Element interface prototype object", + // feature: UIEvent (interface) (with inheritance) interfacePrototypeObject("UIEvent"), "UIEvent interface prototype object", + // named constructor object + + // feature: HTMLImageElement (interface) (with [NamedConstructor]) namedConstructorObject("Image"), "Image named constructor object", + // feature: HTMLAudioElement (interface) (with [NamedConstructor]) namedConstructorObject("Audio"), "Audio named constructor object", + // attribute getter + + // feature: Document.title (attribute) (writable) getter("Document", "title"), "Document.title attribute getter", + // feature: HTMLSelectElement.length (attribute) (writable) getter("HTMLSelectElement", "length"), "HTMLSelectElement.length attribute getter", + // read only attribute getter + + // feature: Node.parentNode (attribute) (read only) getter("Node", "parentNode"), "Node.parentNode attribute getter", + // feature: HTMLFormElement.length (attribute) (read only) getter("HTMLFormElement", "length"), "HTMLFormElement.length attribute getter", + // attribute setter + + // feature: Document.title (attribute) (writable) setter("Document", "title"), "Document.title attribute setter", + // feature: HTMLSelectElement.length (attribute) (writable) setter("HTMLSelectElement", "length"), "HTMLSelectElement.length attribute setter", + // operation function + + // feature: HTMLElement.click (operation) operation("HTMLElement", "click"), "HTMLElement.click function", + // feature: Node.appendChild (operation) operation("Node", "appendChild"), "Node.appendChild function", + // stringifier function + + // feature: DOMTokenList (stringifier) stringifier("DOMTokenList"), "DOMTokenList stringifier function", + // exception interface object + + // feature: DOMException (exception) (without [NoInterfaceObject]) interfaceObject("DOMException"), "DOMException exception interface object", + // exception interface prototype object + + // feature: DOMException (exception) interfacePrototypeObject("DOMException"), "DOMException exception interface prototype object", + // exception field getter + + // feature: DOMException.code (exception field) getter("DOMException", "code"), "DOMException.code exception field getter", + // platform object implementing an interface + + // feature: DOMImplementation (interface) (without inheritance, primary interface) function() { return document.implementation; }, "a platform object implementing DOMImplementation", + // feature: HTMLCollection (interface) (without inheritance, primary interface) function() { return document.getElementsByTagName("div"); }, "a platform object implementing HTMLCollection", + // platform object implementing an inherited interface + + // feature: HTMLDivElement (interface) (with inheritance, primary interface) function() { return document.createElement("div"); }, "a platform object implementing Element", + // feature: UIEvent (interface) (with inheritance, primary interface) function() { return document.createEvent("UIEvent"); }, "a platform object implementing UIEvent", + // platform object representing an exception + + // feature: DOMException (exception) function() { try { document.appendChild(document); @@ -78,10 +136,14 @@ } }, "a platform object representing a DOMException", + // platform array object // XXX + // named properties object + + // feature: Window (interface) (with [NamedPropertiesObject]) function() { return Object.getPrototypeOf(Window.prototype); }, "named properties object" ]; diff --git a/WebIDL/tests/submissions/heycam/float-001.html b/WebIDL/tests/submissions/heycam/float-001.html index fcce2a7dcc7409..818854d50d32de 100644 --- a/WebIDL/tests/submissions/heycam/float-001.html +++ b/WebIDL/tests/submissions/heycam/float-001.html @@ -46,6 +46,8 @@ 1.0000001788139343, 1.000000238418579, "1.0000001788139343" ]; +// feature: SVGNumber.value (attribute) (writable, of type float) + var number = document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGNumber(); for (var i = 0; i < values.length; i += 3) { diff --git a/WebIDL/tests/submissions/heycam/float-002.html b/WebIDL/tests/submissions/heycam/float-002.html index 8ad7b5db891680..153ead276bbfa7 100644 --- a/WebIDL/tests/submissions/heycam/float-002.html +++ b/WebIDL/tests/submissions/heycam/float-002.html @@ -46,6 +46,8 @@ 1.0000001788139343, 1.000000238418579, "1.0000001788139343" ]; +// feature: SVGMatrix.translate (operation) (with argument of type float) + var matrix = document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGMatrix(); for (var i = 0; i < values.length; i += 3) { diff --git a/WebIDL/tests/submissions/heycam/float-003.html b/WebIDL/tests/submissions/heycam/float-003.html index 3e6aaa8fec0619..a81bc344d1c87d 100644 --- a/WebIDL/tests/submissions/heycam/float-003.html +++ b/WebIDL/tests/submissions/heycam/float-003.html @@ -11,6 +11,8 @@ // IDL float values are represented with JS Number values, although only ones // that are (a) finite, and (b) correspond to a single precision value. +// feature: SVGNumber.value (attribute) (of type float) + test(function() { var number = document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGNumber(); number.value = 1.1; @@ -19,6 +21,8 @@ assert_equals(number.value, 1.100000023841858); }, "SVGNumber.value returns a value of the correct type"); +// feature: SVGMatrix.a (attribute) (of type float) + test(function() { var matrix = document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGMatrix(); matrix.a = 1.1; diff --git a/WebIDL/tests/submissions/heycam/functions-001.html b/WebIDL/tests/submissions/heycam/functions-001.html index f55b882b38d56f..ee45b9986f4566 100644 --- a/WebIDL/tests/submissions/heycam/functions-001.html +++ b/WebIDL/tests/submissions/heycam/functions-001.html @@ -15,45 +15,86 @@ var objects = [ // interface object + + // feature: DOMImplementation (interface) (without inheritance, without [NoInterfaceObject]) interfaceObject("DOMImplementation"), "DOMImplementation interface object", + // feature: HTMLCollection (interface) (withogut inheritance, without [NoInterfaceObject]) interfaceObject("HTMLCollection"), "HTMLCollection interface object", + // feature: Element (interface) (with inheritance, without [NoInterfaceObject]) interfaceObject("Element"), "Element interface object", + // feature: UIEvent (interface) (witih inheritance, without [NoInterfaceObject]) interfaceObject("UIEvent"), "UIEvent interface object", + // feature: Event (interface) (with inheritance, with [Constructor]) interfaceObject("Event"), "Event interface object", + // feature: XMLHttpRequest (interface) (with inheritance, with [Constructor]) interfaceObject("XMLHttpRequest"), "XMLHttpRequest interface object", + // named constructor object + + // feature: HTMLImageElement (interface) (with [NamedConstructor]) namedConstructorObject("Image"), "Image named constructor object", + // feature: HTMLAudioElement (interface) (with [NamedConstructor]) namedConstructorObject("Audio"), "Audio named constructor object", + // attribute getter + + // feature: Document.title (attribute) (writable) getter("Document", "title"), "Document.title attribute getter", + // feature: HTMLSelectElement.length (attribute) (writable) getter("HTMLSelectElement", "length"), "HTMLSelectElement.length attribute getter", + // read only attribute getter + + // feature: Node.parentNode (attribute) (read only) getter("Node", "parentNode"), "Node.parentNode attribute getter", + // feature: HTMLFormElement.length (attribute) (read only) getter("HTMLFormElement", "length"), "HTMLFormElement.length attribute getter", + // attribute setter + + // feature: Document.title (attribute) (writable) setter("Document", "title"), "Document.title attribute setter", + // feature: HTMLSelectElement.length (attribute) (writable) setter("HTMLSelectElement", "length"), "HTMLSelectElement.length attribute setter", + // operation function + + // feature: HTMLElement.click (operation) operation("HTMLElement", "click"), "HTMLElement.click function", + // feature: Node.appendChild (operation) operation("Node", "appendChild"), "Node.appendChild function", + // static operation + + // feature: URL.createObjectURL (static operation) staticOperation("URL", "createObjectURL"), "URL.createObjectURL static function", + // feature: CSS.supports (static operation) staticOperation("CSS", "supports"), "CSS.supports static function", + // stringifier function + + // feature: DOMTokenList (stringifier) stringifier("DOMTokenList"), "DOMTokenList stringifier function", + // feature: HTMLAnchorElement (stringifier) stringifier("HTMLAnchorElement"), "HTMLAnchorElement stringifier function", + // exception interface object + + // feature: DOMException (exception) (without [NoInterfaceObject]) interfaceObject("DOMException"), "DOMException exception interface object", + // exception field getter + + // feature: DOMException.code (exception field) getter("DOMException", "code"), "DOMException.code exception field getter", ]; diff --git a/WebIDL/tests/submissions/heycam/implements-001.html b/WebIDL/tests/submissions/heycam/implements-001.html index ac66b6bcdbd24a..533f7b1b9cdc7e 100644 --- a/WebIDL/tests/submissions/heycam/implements-001.html +++ b/WebIDL/tests/submissions/heycam/implements-001.html @@ -13,6 +13,8 @@ // appear on those objects for the LHS interface. If they values of the // properties are objects, they do not refer to the same object. +// feature: URLUtils (interface) (used on RHS of implements statement) + test(function() { var desc1 = Object.getOwnPropertyDescriptor(HTMLAnchorElement.prototype, "href"); var desc2 = Object.getOwnPropertyDescriptor(HTMLAreaElement.prototype, "href"); diff --git a/WebIDL/tests/submissions/heycam/indexed-properties-001.html b/WebIDL/tests/submissions/heycam/indexed-properties-001.html index 6369325f548251..dd557253285337 100644 --- a/WebIDL/tests/submissions/heycam/indexed-properties-001.html +++ b/WebIDL/tests/submissions/heycam/indexed-properties-001.html @@ -12,6 +12,8 @@ // Object.freeze, Object.seal or Object.preventExtensions on it must fail and // throw a TypeError. +// feature: NodeList (interface) (supports indexed properties) + test(function() { var e = document.createElement("span"); assert_throws(new TypeError(), function() { Object.freeze(e.childNodes); }); @@ -28,6 +30,8 @@ }, "Object.preventExtensions must fail on a NodeList since it supports indexed properties"); +// feature: Uint8Array (interface) (supports indexed properties) + test(function() { var a = new Uint8Array(1); assert_throws(new TypeError(), function() { Object.freeze(a); }); diff --git a/WebIDL/tests/submissions/heycam/indexed-properties-002.html b/WebIDL/tests/submissions/heycam/indexed-properties-002.html index d249169b34f215..946aa2b94bf94c 100644 --- a/WebIDL/tests/submissions/heycam/indexed-properties-002.html +++ b/WebIDL/tests/submissions/heycam/indexed-properties-002.html @@ -13,6 +13,8 @@ // exposed through [[GetOwnProperty]] as being enumerable, configurable, // and writable if there is also an indexed property setter. +// feature: NodeList (indexed property getter) (does not have an indexed property setter) + function makeSpan() { var e = document.createElement("span"); e.appendChild(document.createElement("span")); @@ -44,6 +46,8 @@ }, "NodeList allows properties with names that are array index property names to show through from the prototype"); +// feature: HTMLSelectElement (indexed property getter) (has an indexed property setter) + function makeSelect() { var e = document.createElement("select"); e.appendChild(document.createElement("option")); diff --git a/WebIDL/tests/submissions/heycam/indexed-properties-003.html b/WebIDL/tests/submissions/heycam/indexed-properties-003.html index c8e4403917e934..bd28c8bcbfa911 100644 --- a/WebIDL/tests/submissions/heycam/indexed-properties-003.html +++ b/WebIDL/tests/submissions/heycam/indexed-properties-003.html @@ -12,6 +12,8 @@ // creator/setter is not available, then attempting to set a property with // an array property index name will fail. +// feature: NodeList (interface) (supports indexed properties, does not have an indexed property setter, does not have an indexed property creator) + function makeSpan() { var e = document.createElement("span"); e.appendChild(document.createElement("span")); @@ -72,6 +74,8 @@ }, "attempting to define a property with an array index property name (but which is not a supported property index) on a NodeList will throw in strict mode"); +// feature: DOMTokenList (interface) (supports indexed properties, does not have an indexed property setter) + test(function() { var span = document.createElement("span"); span.setAttribute("class", "abc def"); diff --git a/WebIDL/tests/submissions/heycam/indexed-properties-004.html b/WebIDL/tests/submissions/heycam/indexed-properties-004.html index 1c763480671542..02fa664ff5e725 100644 --- a/WebIDL/tests/submissions/heycam/indexed-properties-004.html +++ b/WebIDL/tests/submissions/heycam/indexed-properties-004.html @@ -16,6 +16,8 @@ // the indexed property setter, and subsequent [[GetOwnProperty]] calls will // return a wrtiable, enumerable, configurable property. +// feature: Uint8Array (interface) (supports indexed properties, has an indexed property setter, does not have an indexed property creator) + test(function() { var a = new Uint8Array(1); a[0] = 1; diff --git a/WebIDL/tests/submissions/heycam/indexed-properties-005.html b/WebIDL/tests/submissions/heycam/indexed-properties-005.html index 92134fd9ebd916..e6c244593eb966 100644 --- a/WebIDL/tests/submissions/heycam/indexed-properties-005.html +++ b/WebIDL/tests/submissions/heycam/indexed-properties-005.html @@ -12,6 +12,8 @@ // creator is available, then attempting to set a property with a name that // is not a supported property index will invoke the creator. +// feature: HTMLSelectElement (indexed property creator) + test(function() { var select = document.createElement("select"); select[0] = document.createElement("option"); @@ -32,7 +34,7 @@ } finally { delete HTMLSelectElement.prototype[10]; } -}, "assigning to an array index property (on an HTMLSelectElement) that is not a supported property index and which corresponds to an accessor property on the prototype will invoke that property's setter"); +}, "assigning to an array index property (on an HTMLSelectElement) that is not a supported property index and which corresponds to an accessor property on the prototype will invoke that property's creator"); test(function() { var select = document.createElement("select"); @@ -43,8 +45,10 @@ } finally { delete HTMLSelectElement.prototype[20]; } -}, "defining an array index property (on an HTMLSelectElement) that is not a supported property index and which corresponds to an accessor property on the prototype will invoke the indexed property setter"); +}, "defining an array index property (on an HTMLSelectElement) that is not a supported property index and which corresponds to an accessor property on the prototype will invoke the indexed property creator"); + +// feature: HTMLOptionsCollection (indexed property creator) test(function() { var select = document.createElement("select"); @@ -66,7 +70,7 @@ } finally { delete HTMLOptionsCollection.prototype[10]; } -}, "assigning to an array index property (on an HTMLOptionsCollection) that is not a supported property index and which corresponds to an accessor property on the prototype will invoke that property's setter"); +}, "assigning to an array index property (on an HTMLOptionsCollection) that is not a supported property index and which corresponds to an accessor property on the prototype will invoke that property's creator"); test(function() { var select = document.createElement("select"); @@ -77,5 +81,5 @@ } finally { delete HTMLOptionsCollection.prototype[20]; } -}, "defining an array index property (on an HTMLOptionsCollection) that is not a supported property index and which corresponds to an accessor property on the prototype will invoke the indexed property setter"); +}, "defining an array index property (on an HTMLOptionsCollection) that is not a supported property index and which corresponds to an accessor property on the prototype will invoke the indexed property creator"); diff --git a/WebIDL/tests/submissions/heycam/initial-001.html b/WebIDL/tests/submissions/heycam/initial-001.html index 20c972c6ebedce..3a0e491bd5c073 100644 --- a/WebIDL/tests/submissions/heycam/initial-001.html +++ b/WebIDL/tests/submissions/heycam/initial-001.html @@ -17,59 +17,114 @@ var objects = [ // interface object + + // feature: DOMImplementation (interface) (without inheritance, without [NoInterfaceObject]) interfaceObject("DOMImplementation"), interfaceObject("DOMImplementation", w), "DOMImplementation interface object", + // feature: HTMLCollection (interface) (without inheritance, without [NoInterfaceObject]) interfaceObject("HTMLCollection"), interfaceObject("HTMLCollection", w), "HTMLCollection interface object", + // interface object for inherited interface + + // feature: Element (interface) (with inheritance, without [NoInterfaceObject]) interfaceObject("Element"), interfaceObject("Element", w), "Element interface object", + // feature: UIEvent (interface) (with inheritance, without [NoInterfaceObject]) interfaceObject("UIEvent"), interfaceObject("UIEvent", w), "UIEvent interface object", + // interface prototype object + + // feature: DOMImplementation (interface) (without inheritance) interfacePrototypeObject("DOMImplementation"), interfacePrototypeObject("DOMImplementation", w), "DOMImplementation interface prototype object", + // feature: HTMLCollection (interface) (without inheritance) interfacePrototypeObject("HTMLCollection"), interfacePrototypeObject("HTMLCollection", w), "HTMLCollection interface prototype object", + // interface prototype object for inherited interface + + // feature: Element (interface) (with inheritance) interfacePrototypeObject("Element"), interfacePrototypeObject("Element", w), "Element interface prototype object", + // feature: UIEvent (interface) (with inheritance) interfacePrototypeObject("UIEvent"), interfacePrototypeObject("UIEvent", w), "UIEvent interface prototype object", + // named constructor object + + // feature: HTMLImageElement (interface) (with [NamedConstructor]) namedConstructorObject("Image"), namedConstructorObject("Image", w), "Image named constructor object", + // feature: HTMLAudioElement (interface) (with [NamedConstructor]) namedConstructorObject("Audio"), namedConstructorObject("Audio", w), "Audio named constructor object", + // attribute getter + + // feature: Document.title (attribute) (writable) getter("Document", "title"), getter("Document", "title", w), "Document.title attribute getter", + // feature: HTMLSelectElement.length (attribute) (writable) getter("HTMLSelectElement", "length"), getter("HTMLSelectElement", "length", w), "HTMLSelectElement.length attribute getter", + // read only attribute getter + + // feature: Node.parentNode (attribute) (read only) getter("Node", "parentNode"), getter("Node", "parentNode", w), "Node.parentNode attribute getter", + // feature: HTMLFormElement.length (attribute) (read only) getter("HTMLFormElement", "length"), getter("HTMLFormElement", "length", w), "HTMLFormElement.length attribute getter", + // attribute setter + + // feature: Document.title (attribute) (writable) setter("Document", "title"), setter("Document", "title", w), "Document.title attribute setter", + // feature: HTMLSelectElement.length (attribute) (writable) setter("HTMLSelectElement", "length"), setter("HTMLSelectElement", "length", w), "HTMLSelectElement.length attribute setter", + // operation function + + // feature: HTMLElement.click (operation) operation("HTMLElement", "click"), operation("HTMLElement", "click", w), "HTMLElement.click function", + // feature: Node.appendChild (operation) operation("Node", "appendChild"), operation("Node", "appendChild", w), "Node.appendChild function", + // static operation function + + // feature: URL.createObjectURL (static operation) staticOperation("URL", "createObjectURL"), staticOperation("URL", "createObjectURL", w), "URL.createObjectURL function", + // feature: CSS.supports (static operation) staticOperation("CSS", "supports"), staticOperation("CSS", "supports", w), "CSS.supports function", + // stringifier function + + // feature: DOMTokenList (stringifier) stringifier("DOMTokenList"), stringifier("DOMTokenList", w), "DOMTokenList stringifier function", + // feature: HTMLAnchorElement (stringifier) stringifier("HTMLAnchorElement"), stringifier("HTMLAnchorElement", w), "HTMLAnchorElement stringifier function", + // exception interface object + + // feature: DOMException (exception) (without [NoInterfaceObject]) interfaceObject("DOMException"), interfaceObject("DOMException", w), "DOMException exception interface object", + // exception interface prototype object + + // feature: DOMException (exception) interfacePrototypeObject("DOMException"), interfacePrototypeObject("DOMException", w), "DOMException exception interface prototype object", + // exception field getter + + // feature: DOMException.code (exception field) getter("DOMException", "code"), getter("DOMException", "code", w), "DOMException.code exception field getter", + // named properties object + + // feature: Window (interface) (with [NamedPropertiesObject]) function() { return Object.getPrototypeOf(Window.prototype); }, function() { return Object.getPrototypeOf(w.Window.prototype); }, "named properties object" ]; diff --git a/WebIDL/tests/submissions/heycam/initial-002.html b/WebIDL/tests/submissions/heycam/initial-002.html index 5a4c7afe6376ae..155d9abf74ee57 100644 --- a/WebIDL/tests/submissions/heycam/initial-002.html +++ b/WebIDL/tests/submissions/heycam/initial-002.html @@ -18,54 +18,114 @@ var objects = [ // interface object + + // feature: DOMImplementation (interface) (without inheritance, without [NoInterfaceObject]) interfaceObject("DOMImplementation"), interfaceObject("DOMImplementation", w), "DOMImplementation interface object", + // feature: HTMLCollection (interface) (without inheritance, without [NoInterfaceObject]) interfaceObject("HTMLCollection"), interfaceObject("HTMLCollection", w), "HTMLCollection interface object", + // interface object for inherited interface + + // feature: Element (interface) (with inheritance, without [NoInterfaceObject]) interfaceObject("Element"), interfaceObject("Element", w), "Element interface object", + // feature: UIEvent (interface) (with inheritance, without [NoInterfaceObject]) interfaceObject("UIEvent"), interfaceObject("UIEvent", w), "UIEvent interface object", + // interface prototype object + + // feature: DOMImplementation (interface) (without inheritance) interfacePrototypeObject("DOMImplementation"), interfacePrototypeObject("DOMImplementation", w), "DOMImplementation interface prototype object", + // feature: HTMLCollection (interface) (without inheritance) interfacePrototypeObject("HTMLCollection"), interfacePrototypeObject("HTMLCollection", w), "HTMLCollection interface prototype object", + // interface prototype object for inherited interface + + // feature: Element (interface) (with inheritance) interfacePrototypeObject("Element"), interfacePrototypeObject("Element", w), "Element interface prototype object", + // feature: UIEvent (interface) (with inheritance) interfacePrototypeObject("UIEvent"), interfacePrototypeObject("UIEvent", w), "UIEvent interface prototype object", + // named constructor object + + // feature: HTMLImageElement (interface) (with [NamedConstructor]) namedConstructorObject("Image"), namedConstructorObject("Image", w), "Image named constructor object", + // feature: HTMLAudioElement (interface) (with [NamedConstructor]) namedConstructorObject("Audio"), namedConstructorObject("Audio", w), "Audio named constructor object", + // attribute getter + + // feature: Document.title (attribute) (writable) getter("Document", "title"), getter("Document", "title", w), "Document.title attribute getter", + // feature: HTMLSelectElement.length (attribute) (writable) getter("HTMLSelectElement", "length"), getter("HTMLSelectElement", "length", w), "HTMLSelectElement.length attribute getter", + // read only attribute getter + + // feature: Node.parentNode (attribute) (read only) getter("Node", "parentNode"), getter("Node", "parentNode", w), "Node.parentNode attribute getter", + // feature: HTMLFormElement.length (attribute) (read only) getter("HTMLFormElement", "length"), getter("HTMLFormElement", "length", w), "HTMLFormElement.length attribute getter", + // attribute setter + + // feature: Document.title (attribute) (writable) setter("Document", "title"), setter("Document", "title", w), "Document.title attribute setter", + // feature: HTMLSelectElement.length (attribute) (writable) setter("HTMLSelectElement", "length"), setter("HTMLSelectElement", "length", w), "HTMLSelectElement.length attribute setter", + // operation function + + // feature: HTMLElement.click (operation) operation("HTMLElement", "click"), operation("HTMLElement", "click", w), "HTMLElement.click function", + // feature: Node.appendChild (operation) operation("Node", "appendChild"), operation("Node", "appendChild", w), "Node.appendChild function", + + // static operation function + + // feature: URL.createObjectURL (static operation) + staticOperation("URL", "createObjectURL"), staticOperation("URL", "createObjectURL", w), "URL.createObjectURL function", + // feature: CSS.supports (static operation) + staticOperation("CSS", "supports"), staticOperation("CSS", "supports", w), "CSS.supports function", + + // stringifier function + + // feature: DOMTokenList (stringifier) stringifier("DOMTokenList"), stringifier("DOMTokenList", w), "DOMTokenList stringifier function", + // feature: HTMLAnchorElement (stringifier) + stringifier("HTMLAnchorElement"), stringifier("HTMLAnchorElement", w), "HTMLAnchorElement stringifier function", + // exception interface object + + // feature: DOMException (exception) (without [NoInterfaceObject]) interfaceObject("DOMException"), interfaceObject("DOMException", w), "DOMException exception interface object", + // exception interface prototype object + + // feature: DOMException (exception) interfacePrototypeObject("DOMException"), interfacePrototypeObject("DOMException", w), "DOMException exception interface prototype object", + // exception field getter + + // feature: DOMException.code (exception field) getter("DOMException", "code"), getter("DOMException", "code", w), "DOMException.code exception field getter", + // named properties object + + // feature: Window (interface) (with [NamedPropertiesObject]) function() { return Object.getPrototypeOf(Window.prototype); }, function() { return Object.getPrototypeOf(w.Window.prototype); }, "named properties object" ]; diff --git a/WebIDL/tests/submissions/heycam/interface-001.html b/WebIDL/tests/submissions/heycam/interface-001.html index ad3bc7fb19358c..c874ca25f0bd24 100644 --- a/WebIDL/tests/submissions/heycam/interface-001.html +++ b/WebIDL/tests/submissions/heycam/interface-001.html @@ -11,7 +11,23 @@ // For each interface that isn't [NoInterfaceObject], there's a property // on the global object that is writable, unenumerable and configurable. -var interfaces = ["DOMImplementation", "HTMLCollection", "Element", "UIEvent", "NodeFilter"]; +var interfaces = [ + + // feature: DOMImplementation (interface) (without inheritance, without [NoInterfaceObject]) + "DOMImplementation", + + // feature: HTMLCollection (interface) (without inheritance, without [NoInterfaceObject]) + "HTMLCollection", + + // feature: Element (interface) (with inheritance, without [NoInterfaceObject]) + "Element", + + // feature: UIEvent (interface) (with inheritance, without [NoInterfaceObject]) + "UIEvent", + + // feature: NodeFilter (callback interface) (with constants) + "NodeFilter" +]; for (var i = 0; i < interfaces.length; i++) { var name = interfaces[i]; diff --git a/WebIDL/tests/submissions/heycam/interface-object-001.html b/WebIDL/tests/submissions/heycam/interface-object-001.html index 24f3bd3059837b..78603ae53a3211 100644 --- a/WebIDL/tests/submissions/heycam/interface-object-001.html +++ b/WebIDL/tests/submissions/heycam/interface-object-001.html @@ -12,6 +12,8 @@ // property (non-writable, non-enumerable, non-configurable), since it is // a function object. Its value is the interface prototype object. +// feature: DOMImplementation (interface) + test(function() { assert_property(DOMImplementation, "prototype", { writable: false, enumerable: false, configurable: false }, "DOMImplementation.prototype"); }, "DOMImplementation.prototype has the right attributes"); @@ -24,6 +26,8 @@ assert_equals(typeof DOMImplementation, "function"); }, "typeof DOMImplementation is correct"); +// feature: HTMLCollection (interface) + test(function() { assert_property(HTMLCollection, "prototype", { writable: false, enumerable: false, configurable: false }, "HTMLCollection.prototype"); }, "HTMLCollection.prototype has the right attributes"); diff --git a/WebIDL/tests/submissions/heycam/interface-object-002.html b/WebIDL/tests/submissions/heycam/interface-object-002.html index 83dce3049a2b96..c20984a35acd93 100644 --- a/WebIDL/tests/submissions/heycam/interface-object-002.html +++ b/WebIDL/tests/submissions/heycam/interface-object-002.html @@ -12,6 +12,8 @@ // being constants on the interface) does not have a "prototype" property, // and is not a function object. +// feature: NodeFilter (callback interface) (with constants) + test(function() { assert_true(!NodeFilter.hasOwnProperty("prototype")); }, "window.NodeFilter does not have a \"prototype\" property"); diff --git a/WebIDL/tests/submissions/heycam/interface-prototype-object-001.html b/WebIDL/tests/submissions/heycam/interface-prototype-object-001.html index 3819a7fffb8f8e..82f50ad8154ae9 100644 --- a/WebIDL/tests/submissions/heycam/interface-prototype-object-001.html +++ b/WebIDL/tests/submissions/heycam/interface-prototype-object-001.html @@ -15,9 +15,17 @@ // [NoInterfaceObject]. var interfaces = [ + + // feature: DOMImplementation (interface) (without inheritance, without [NoInterfaceObject]) "DOMImplementation", "Object", + + // feature: HTMLCollection (interface) (without inheritance, without [NoInterfaceObject]) "HTMLCollection", "Object", + + // feature: Element (interface) (with inheritance, without [NoInterfaceObject]) "Element", "Node", + + // feature: UIEvent (interface) (with inheritance, without [NoInterfaceObject]) "UIEvent", "Event" ]; diff --git a/WebIDL/tests/submissions/heycam/interface-type-001.html b/WebIDL/tests/submissions/heycam/interface-type-001.html index 4bd7f6fccc4add..d4d2027135bb38 100644 --- a/WebIDL/tests/submissions/heycam/interface-type-001.html +++ b/WebIDL/tests/submissions/heycam/interface-type-001.html @@ -43,6 +43,8 @@ otherSpan, otherSpan, "otherSpan" ]; + // feature: Node.appendChild (operation) (with argument of an interface type) + for (var i = 0; i < values.length; i += 3) { var value = values[i]; var expected = values[i + 1]; diff --git a/WebIDL/tests/submissions/heycam/interface-type-002.html b/WebIDL/tests/submissions/heycam/interface-type-002.html index ee316702373611..00e2b356c461a3 100644 --- a/WebIDL/tests/submissions/heycam/interface-type-002.html +++ b/WebIDL/tests/submissions/heycam/interface-type-002.html @@ -45,6 +45,8 @@ otherMatrix, SVGPoint, "otherMatrix" ]; + // feature: SVGPoint.matrixTransform (operation) (with argument of an interface type) + for (var i = 0; i < values.length; i += 3) { var value = values[i]; var expected = values[i + 1]; diff --git a/WebIDL/tests/submissions/heycam/interface-type-003.html b/WebIDL/tests/submissions/heycam/interface-type-003.html index fc78b553164563..23e4ae3d738c4c 100644 --- a/WebIDL/tests/submissions/heycam/interface-type-003.html +++ b/WebIDL/tests/submissions/heycam/interface-type-003.html @@ -18,6 +18,8 @@ // We are using EventTarget.addEventListener() for this test, which has an // "EventListener?" argument. +// feature: EventTarget.addEventListener (operation) (with argument of a single operation callback interface type) + function dispatchEvent(target) { var event = document.createEvent("Event"); event.initEvent("test", false, false); diff --git a/WebIDL/tests/submissions/heycam/interface-type-004.html b/WebIDL/tests/submissions/heycam/interface-type-004.html index b46f7fea7a2cb3..b3803827756920 100644 --- a/WebIDL/tests/submissions/heycam/interface-type-004.html +++ b/WebIDL/tests/submissions/heycam/interface-type-004.html @@ -11,12 +11,16 @@ // IDL values of an interface type are represented with JS object references // to platform objects that implement the interface. +// feature: Node.parentNode (attribute) (of an interface type) + test(function() { var n = document.body.parentNode; assert_equals(typeof n, "object"); assert_true(n instanceof Node); }, "Node.parentNode returns a value of the correct type"); +// feature: SVGSVGElement.createSVGPoint (operation) (with interface type return type) + test(function() { var p = document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGPoint(); assert_equals(typeof p, "object"); diff --git a/WebIDL/tests/submissions/heycam/legacy-caller-001.html b/WebIDL/tests/submissions/heycam/legacy-caller-001.html index 4a4233a7aa565c..dfb2dd749aa59b 100644 --- a/WebIDL/tests/submissions/heycam/legacy-caller-001.html +++ b/WebIDL/tests/submissions/heycam/legacy-caller-001.html @@ -11,6 +11,8 @@ // Objects that implement an interface that has a legacy caller have an // internal [[Call]] method that invokes the caller behavior. +// feature: HTMLObjectElement (interface) (with a legacy caller) + test(function() { var object = document.createElement("object"); assert_equals(typeof object, "function"); diff --git a/WebIDL/tests/submissions/heycam/long-001.html b/WebIDL/tests/submissions/heycam/long-001.html index 437368197656ff..96e9867f529188 100644 --- a/WebIDL/tests/submissions/heycam/long-001.html +++ b/WebIDL/tests/submissions/heycam/long-001.html @@ -39,6 +39,8 @@ 1.5, 1, "1.5" ]; +// feature: HTMLPreElement.width (attribute) (writable, of type long) + var pre = document.createElement("pre"); for (var i = 0; i < values.length; i += 3) { diff --git a/WebIDL/tests/submissions/heycam/long-002.html b/WebIDL/tests/submissions/heycam/long-002.html index dadc6f472dbaec..3fd4e4c747d8c0 100644 --- a/WebIDL/tests/submissions/heycam/long-002.html +++ b/WebIDL/tests/submissions/heycam/long-002.html @@ -39,6 +39,8 @@ 1.5, 1, "1.5" ]; +// feature: HTMLElement.tabIndex (attribute) (writable, of type long) + var span = document.createElement("span"); for (var i = 0; i < values.length; i += 3) { diff --git a/WebIDL/tests/submissions/heycam/long-003.html b/WebIDL/tests/submissions/heycam/long-003.html index 65cfef424be782..71c91430d5cfcc 100644 --- a/WebIDL/tests/submissions/heycam/long-003.html +++ b/WebIDL/tests/submissions/heycam/long-003.html @@ -11,12 +11,16 @@ // IDL long values are represented as integer JS Number values in the // range [-2147483648, 2147483647]. +// feature: HTMLPreElement.width (attribute) (of type long) + test(function() { var e = document.createElement("pre"); assert_equals(typeof e.width, "number"); assert_true(e.width == Math.floor(e.width) && e.width >= -2147483648 && e.width <= 2147483647); }, "HTMLPreElement.width returns a value of the correct type"); +// feature: HTMLElement.tabIndex (attribute) (of type long) + test(function() { var e = document.createElement("span"); assert_equals(typeof e.tabIndex, "number"); diff --git a/WebIDL/tests/submissions/heycam/named-properties-001.html b/WebIDL/tests/submissions/heycam/named-properties-001.html index 1eeed812a3b906..9ad6cd6c7fce18 100644 --- a/WebIDL/tests/submissions/heycam/named-properties-001.html +++ b/WebIDL/tests/submissions/heycam/named-properties-001.html @@ -16,6 +16,8 @@ // Object.freeze, Object.seal or Object.preventExtensions on it must fail and // throw a TypeError. +// feature: Storage (interface) (supports named properties) + test(function() { var storage = document.getElementById("iframe").contentWindow.localStorage; assert_throws(new TypeError(), function() { Object.freeze(storage); }); @@ -32,6 +34,8 @@ }, "Object.preventExtensions must fail on a Storage since it supports named properties"); +// feature: DOMStringMap (interface) (supports named properties) + test(function() { var dataset = document.createElement("span").dataset; assert_throws(new TypeError(), function() { Object.freeze(dataset); }); diff --git a/WebIDL/tests/submissions/heycam/named-properties-002.html b/WebIDL/tests/submissions/heycam/named-properties-002.html index 87224556e03985..0df30869a0bb6e 100644 --- a/WebIDL/tests/submissions/heycam/named-properties-002.html +++ b/WebIDL/tests/submissions/heycam/named-properties-002.html @@ -24,7 +24,7 @@ // exposed, even if it doesn't currently correspond to a supported index // property. -// DOMStringMap: HTMLElement.dataset (has a getter and setter) +// feature: DOMStringMap (named property getter) (has a named property setter) test(function() { var span = document.createElement("span"); @@ -85,7 +85,7 @@ }, "DOMStringMap exposes named properties if there was a same named property on Object.prototype that was deleted"); -// HTMLCollection: Document.forms (has a getter but not setter) +// feature: HTMLCollection (named property getter) (does not have a named property setter, supports indexed properties) var container = document.getElementById("container"); diff --git a/WebIDL/tests/submissions/heycam/named-properties-003.html b/WebIDL/tests/submissions/heycam/named-properties-003.html index 35d7640b4c4095..bce30cd13eb754 100644 --- a/WebIDL/tests/submissions/heycam/named-properties-003.html +++ b/WebIDL/tests/submissions/heycam/named-properties-003.html @@ -16,6 +16,8 @@ // set a property with a name that is not a supported property name will // fall through to setting the property on the object. +// feature: HTMLCollection (interface) (supports named properties, does not have a named property setter, does not have a named property creator) + var container = document.getElementById("container"); function clearContainer() { diff --git a/WebIDL/tests/submissions/heycam/named-properties-004.html b/WebIDL/tests/submissions/heycam/named-properties-004.html index 2cbff709d0ca14..039eceda8b27fe 100644 --- a/WebIDL/tests/submissions/heycam/named-properties-004.html +++ b/WebIDL/tests/submissions/heycam/named-properties-004.html @@ -12,6 +12,8 @@ // creator is available, then attempting to set a property with a name that // is not a supported property name will invoke the creator. +// feature: DOMStringMap (named property creator) + test(function() { var span = document.createElement("span"); span.dataset.hello1 = "test"; @@ -32,7 +34,7 @@ } finally { delete DOMStringMap.prototype.hello2; } -}, "assigning to a property (on an DOMStringMap) that is not a supported property name and which corresponds to an accessor property on the prototype will invoke that property's setter"); +}, "assigning to a property (on an DOMStringMap) that is not a supported property name and which corresponds to an accessor property on the prototype will invoke that property's creator"); test(function() { var span = document.createElement("span"); @@ -43,8 +45,10 @@ } finally { delete DOMStringMap.prototype.hello4; } -}, "defining a property (on an DOMStringMap) that is not a supported property name and which corresponds to an accessor property on the prototype will invoke the named property setter"); +}, "defining a property (on an DOMStringMap) that is not a supported property name and which corresponds to an accessor property on the prototype will invoke the named property creator"); + +// feature: Storage (named property creator) test(function() { window.localStorage.hello1 = "test"; @@ -63,7 +67,7 @@ } finally { delete Storage.prototype.hello2; } -}, "assigning to a property (on an Storage) that is not a supported property name and which corresponds to an accessor property on the prototype will invoke that property's setter"); +}, "assigning to a property (on an Storage) that is not a supported property name and which corresponds to an accessor property on the prototype will invoke that property's creator"); test(function() { Object.defineProperty(Storage.prototype, "hello4", { get: function() { }, set: function() { throw { name: "SomeError" }; } }); @@ -73,5 +77,5 @@ } finally { delete Storage.prototype.hello4; } -}, "defining a property (on an Storage) that is not a supported property name and which corresponds to an accessor property on the prototype will invoke the named property setter"); +}, "defining a property (on an Storage) that is not a supported property name and which corresponds to an accessor property on the prototype will invoke the named property creator"); diff --git a/WebIDL/tests/submissions/heycam/named-properties-005.html b/WebIDL/tests/submissions/heycam/named-properties-005.html index d8ebe3df162599..2d6e7c84b4d949 100644 --- a/WebIDL/tests/submissions/heycam/named-properties-005.html +++ b/WebIDL/tests/submissions/heycam/named-properties-005.html @@ -12,6 +12,8 @@ // deleter is available, then attempting to delete a property with a name that // is a supported property name will invoke the deleter. +// feature: DOMStringMap (named property deleter) + test(function() { var span = document.createElement("span"); span.dataset.hello = "test"; @@ -28,6 +30,8 @@ assert_true(span.hasAttribute("data-constructor")); }, "using delete on a DOMStringMap on a named property that is hidden due to the named property visibility algorithm will not invoke the named property deleter"); +// feature: Storage (named property deleter) + test(function() { window.localStorage.hello = "test"; assert_equals(window.localStorage.getItem("hello"), "test"); diff --git a/WebIDL/tests/submissions/heycam/nullable-001.html b/WebIDL/tests/submissions/heycam/nullable-001.html index 42de1ef51f9468..c2966304e4a712 100644 --- a/WebIDL/tests/submissions/heycam/nullable-001.html +++ b/WebIDL/tests/submissions/heycam/nullable-001.html @@ -11,6 +11,8 @@ // Except in the face of [TreatUndefinedAs] and [TreatNonCallableAs], JS // undefined and null values get converted to IDL null. +// feature: Node.textContext (attribute) (writable, of type DOMString?) + test(function() { var span = document.createElement("span"); span.textContent = "test"; diff --git a/WebIDL/tests/submissions/heycam/nullable-002.html b/WebIDL/tests/submissions/heycam/nullable-002.html index 34a6d073b2b2fc..ad2eaf2b6bbe3e 100644 --- a/WebIDL/tests/submissions/heycam/nullable-002.html +++ b/WebIDL/tests/submissions/heycam/nullable-002.html @@ -11,6 +11,8 @@ // Except in the face of [TreatUndefinedAs] and [TreatNonCallableAs], JS // undefined and null values get converted to IDL null. +// feature: Node.insertBefore (attribute) (writable, of a nullable interface type) + function makeDiv() { var div = document.createElement("div"); div.appendChild(document.createElement("span")); diff --git a/WebIDL/tests/submissions/heycam/nullable-003.html b/WebIDL/tests/submissions/heycam/nullable-003.html index eb60aafa916d85..6daea10e57198a 100644 --- a/WebIDL/tests/submissions/heycam/nullable-003.html +++ b/WebIDL/tests/submissions/heycam/nullable-003.html @@ -13,6 +13,8 @@ // IDL nullable types are represented as the JS null value, if the IDL // value is null, or of a type appropriate for the inner type otherwise. +// feature: Document.getElementById (operation) (with a nullable return type) + test(function() { var e = document.getElementById("span"); assert_equals(typeof e, "object"); diff --git a/WebIDL/tests/submissions/heycam/object-001.html b/WebIDL/tests/submissions/heycam/object-001.html index 6b9927539818f6..12a5ab27718a1e 100644 --- a/WebIDL/tests/submissions/heycam/object-001.html +++ b/WebIDL/tests/submissions/heycam/object-001.html @@ -30,6 +30,8 @@ regexp, regexp, "/abc/" ]; +// feature: TrackEventInit.track (dictionary member) (of type object?) + for (var i = 0; i < values.length; i += 3) { var value = values[i]; var expected = values[i + 1]; diff --git a/WebIDL/tests/submissions/heycam/object-002.html b/WebIDL/tests/submissions/heycam/object-002.html index a59c2548943678..f0e4d500672104 100644 --- a/WebIDL/tests/submissions/heycam/object-002.html +++ b/WebIDL/tests/submissions/heycam/object-002.html @@ -10,6 +10,8 @@ // // IDL object values are represented with JS object references. +// feature: TrackEvent.track (attribute) (of type object?) + test(function() { var e = new TrackEvent("test", { track: { } }); assert_true(typeof e.track == "object" || typeof e.track == "function"); diff --git a/WebIDL/tests/submissions/heycam/octet-001.html b/WebIDL/tests/submissions/heycam/octet-001.html index aa14c862092575..05bc0fdcbb5d96 100644 --- a/WebIDL/tests/submissions/heycam/octet-001.html +++ b/WebIDL/tests/submissions/heycam/octet-001.html @@ -40,6 +40,8 @@ 1.5, 1, "1.5" ]; +// feature: Uint8Array (indexed property setter) (of type octet) + var a = new Uint8Array(1); for (var i = 0; i < values.length; i += 3) { diff --git a/WebIDL/tests/submissions/heycam/octet-002.html b/WebIDL/tests/submissions/heycam/octet-002.html index 5c7374e44d6488..21875210601957 100644 --- a/WebIDL/tests/submissions/heycam/octet-002.html +++ b/WebIDL/tests/submissions/heycam/octet-002.html @@ -11,6 +11,8 @@ // IDL octet values are represented as integer JS Number values in the range // [0, 255]. +// feature: Uint8Array (indexed property getter) (of type octet) + test(function() { var a = new Uint8Array(1); assert_equals(typeof a[0], "number"); diff --git a/WebIDL/tests/submissions/heycam/operation-001.html b/WebIDL/tests/submissions/heycam/operation-001.html index 2ffc9a928c5a1a..7a0224ba22e457 100644 --- a/WebIDL/tests/submissions/heycam/operation-001.html +++ b/WebIDL/tests/submissions/heycam/operation-001.html @@ -14,14 +14,35 @@ // operation. var operations = [ + + // feature: HTMLElement.click (operation) "HTMLElement", "click", 0, + + // feature: Node.appendChild (operation) "Node", "appendChild", 1, + + // feature: DOMTokenList.add (operation) (variadic) "DOMTokenList", "add", 0, + + // feature: Window.setTimeout (operation) (variadic) "Window", "setTimeout", 1, + + // feature: Window.postMessage (operation) (with optional argument) "Window", "postMessage", 2, + + // feature: DOMImplementation.createHTMLDocument (operation) (with optional argument) "DOMImplementation", "createHTMLDocument", 0, + + // feature: Node.cloneNode (operation) (with optional argument default value) "Node", "cloneNode", 0, + + // feature: HTMLSelectElement.add (operation) (with optional argument default value) + "HTMLSelectElement", "add", 1, + + // feature: CanvasRenderingContext2D.drawImage (operation) (overloaded) "CanvasRenderingContext2D", "drawImage", 3, + + // feature: FormData.append (operation) (overloaded) "FormData", "append", 2 ]; diff --git a/WebIDL/tests/submissions/heycam/operation-002.html b/WebIDL/tests/submissions/heycam/operation-002.html index c03a7751cb37cb..d17aeeb24a2177 100644 --- a/WebIDL/tests/submissions/heycam/operation-002.html +++ b/WebIDL/tests/submissions/heycam/operation-002.html @@ -20,6 +20,8 @@ // be applied to objects of the right type from other windows. // Calling it with a bad this object value will throw a TypeError. +// feature: Window.postMessage (operation) (with optional argument) + test(function() { assert_throws(new TypeError(), function() { window.postMessage(); }); }, "Window.postMessage throws when no arguments passed"); @@ -52,6 +54,8 @@ }, "Window.postMessage throws a TypeError when called with a bad this-value"); +// feature: DOMImplementation.createHTMLDocument (operation) (with optional argument) + test(function() { var doc = document.implementation.createHTMLDocument("test", "extra"); assert_equals(doc.title, "test"); diff --git a/WebIDL/tests/submissions/heycam/operation-003.html b/WebIDL/tests/submissions/heycam/operation-003.html index 6cf8dd8e61ba5b..39d183a0774e05 100644 --- a/WebIDL/tests/submissions/heycam/operation-003.html +++ b/WebIDL/tests/submissions/heycam/operation-003.html @@ -17,6 +17,8 @@ // beyond those explicitly listed in the IDL are passed in are converted // to the variadic argument type. +// feature: DOMTokenList.add (operation) (variadic) + test(function() { var span = document.createElement("span"); span.setAttribute("class", "abc"); @@ -42,6 +44,8 @@ }, "passing multiple arguments corresponding to the variadic argument of DOMTokenList.add works"); +// feature: WindowTimers.setTimeout (operation) (variadic) + test(function() { assert_throws(new TypeError(), function() { window.setTimeout(); }); }, "passing too few arguments to WindowTimers.setTimeout throws"); diff --git a/WebIDL/tests/submissions/heycam/operation-004.html b/WebIDL/tests/submissions/heycam/operation-004.html index 32964644ea322e..9eeebbcf66473e 100644 --- a/WebIDL/tests/submissions/heycam/operation-004.html +++ b/WebIDL/tests/submissions/heycam/operation-004.html @@ -22,6 +22,8 @@ // argument might then cause the call to fail (and a TypeError to be thrown) if // there is not an appropriate value passed in that position. +// feature: CanvasRenderingContext2D.drawImage (operation) (overloaded) + // void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy); // void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh); // void drawImage(CanvasImageSource image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh); @@ -120,6 +122,9 @@ assert_throws(new TypeError(), function() { CanvasRenderingContext2D.prototype.drawImage.call(document, 0, { valueOf: function() { throw "something"; } }); }); }, "CanvasRenderingContext2D.drawImage() throws when called with a bad this-value"); + +// feature: CanvasRenderingContext2D.createImageData (operation) (overloaded) + // ImageData createImageData(double sw, double sh); // ImageData createImageData(ImageData imagedata); diff --git a/WebIDL/tests/submissions/heycam/platform-object-001.html b/WebIDL/tests/submissions/heycam/platform-object-001.html index 47ecff4733af19..bccabdd09c8f28 100644 --- a/WebIDL/tests/submissions/heycam/platform-object-001.html +++ b/WebIDL/tests/submissions/heycam/platform-object-001.html @@ -12,9 +12,17 @@ // interface prototype object of its primary interface. var objects = [ + + // DOMImplementation (interface) (without inheritance, primary interface) function() { return document.implementation; }, "DOMImplementation", + + // HTMLCollection (interface) (without inheritance, primary interface) function() { return document.forms; }, "HTMLCollection", + + // HTMLSpanElement (interface) (with inheritance, primary interface) function() { return document.createElement("span"); }, "HTMLSpanElement", + + // UIEvent (interface) (with inheritance, primary interface) function() { return document.createEvent("UIEvent"); }, "UIEvent" ]; diff --git a/WebIDL/tests/submissions/heycam/property-enumeration-001.html b/WebIDL/tests/submissions/heycam/property-enumeration-001.html index a01488abe4935f..154257dde89da4 100644 --- a/WebIDL/tests/submissions/heycam/property-enumeration-001.html +++ b/WebIDL/tests/submissions/heycam/property-enumeration-001.html @@ -19,6 +19,8 @@ // of supported property names. Finally, any own properties and properties // from the prototype are enumerated, in an unspecified order. +// feature: HTMLCollection (interface) (supports indexed properties, supports named properties) + test(function() { document.forms.some = 1; document.forms.thing = 1; @@ -49,6 +51,9 @@ assert_array_equals(actualOrder, expectedOrder); }, "HTMLCollection enumerates properties in the right order"); + +// feature: Uint8Array (interface) (supports indexed properties, does not support named properties) + test(function() { var a = new Uint8Array(3); a.something = 1; @@ -69,6 +74,9 @@ assert_array_equals(actualOrder, expectedOrder); }, "Uint8Array enumerates properties in the right order"); + +// feature: DOMStringMap (interface) (does not support indexed properties, supports named properties) + test(function() { try { DOMStringMap.prototype.some = 1; diff --git a/WebIDL/tests/submissions/heycam/sequence-001.html b/WebIDL/tests/submissions/heycam/sequence-001.html index 1ffa5ac51d9fef..a9e52782fe85db 100644 --- a/WebIDL/tests/submissions/heycam/sequence-001.html +++ b/WebIDL/tests/submissions/heycam/sequence-001.html @@ -14,6 +14,8 @@ // Other objects will have [[Get]] called on their "length" property, and then // [[Get]] on each array index element. +// feature: MutationObserverInit.attributeFilter (dictionary member) (of a sequence type) + function testArray(array, expected, desc) { doTest(array, array, expected, null, null, null, desc); } diff --git a/WebIDL/tests/submissions/heycam/sequence-002.html b/WebIDL/tests/submissions/heycam/sequence-002.html index ba59eb133379ad..d656407f85e604 100644 --- a/WebIDL/tests/submissions/heycam/sequence-002.html +++ b/WebIDL/tests/submissions/heycam/sequence-002.html @@ -12,6 +12,8 @@ // which have had their array index properties set as own, writable, enumerable, // configurable properties. +// feature: MutationCallback (operation) (on a callback interface, of a sequence type) + async_test(function(t) { var span = document.createElement("span"); var obs = new MutationObserver(function(records) { diff --git a/WebIDL/tests/submissions/heycam/short-001.html b/WebIDL/tests/submissions/heycam/short-001.html index 5392f01614b8ae..869b38637b55e4 100644 --- a/WebIDL/tests/submissions/heycam/short-001.html +++ b/WebIDL/tests/submissions/heycam/short-001.html @@ -40,6 +40,8 @@ 1.5, 1, "1.5" ]; +// feature: Int16Array (indexed property setter) (of type short) + var a = new Int16Array(1); for (var i = 0; i < values.length; i += 3) { diff --git a/WebIDL/tests/submissions/heycam/short-002.html b/WebIDL/tests/submissions/heycam/short-002.html index b3b85af31c7e76..c6e71cfad93fdc 100644 --- a/WebIDL/tests/submissions/heycam/short-002.html +++ b/WebIDL/tests/submissions/heycam/short-002.html @@ -11,6 +11,8 @@ // IDL short values are represented as integer JS Number values in the range // [-32768, 32767]. +// feature: Int16Array (indexed property getter) (of type short) + test(function() { var a = new Int16Array(1); assert_equals(typeof a[0], "number"); diff --git a/WebIDL/tests/submissions/heycam/stringifier-001.html b/WebIDL/tests/submissions/heycam/stringifier-001.html index 37a87e009e20f8..89af3f18f266f5 100644 --- a/WebIDL/tests/submissions/heycam/stringifier-001.html +++ b/WebIDL/tests/submissions/heycam/stringifier-001.html @@ -13,7 +13,11 @@ // object value has length = 0. var stringifiers = [ + + // feature: HTMLAnchorElement (stringifier) "HTMLAnchorElement", + + // feature: DOMTokenList (stringifier) "DOMTokenList" ]; diff --git a/WebIDL/tests/submissions/heycam/stringifier-002.html b/WebIDL/tests/submissions/heycam/stringifier-002.html index 0b6ff79b57435f..b2c4d48cb758ca 100644 --- a/WebIDL/tests/submissions/heycam/stringifier-002.html +++ b/WebIDL/tests/submissions/heycam/stringifier-002.html @@ -13,6 +13,8 @@ // Function ignores any arguments passed to it. If applied to the wrong kind // of object, a TypeError is thrown. +// feature: HTMLAnchorElement (stringifier) + var url = "http://test.invalid/somewhere"; test(function() { diff --git a/WebIDL/tests/submissions/heycam/throwing-001.html b/WebIDL/tests/submissions/heycam/throwing-001.html index 518039e0d4b824..6257a6d6d1e4ab 100644 --- a/WebIDL/tests/submissions/heycam/throwing-001.html +++ b/WebIDL/tests/submissions/heycam/throwing-001.html @@ -17,6 +17,8 @@ var iframe = document.getElementById("iframe"); +// feature: HTMLSelectElement.length (attribute) + test(function() { var desc = Object.getOwnPropertyDescriptor(iframe.contentWindow.HTMLSelectElement, "length"); try { @@ -27,6 +29,8 @@ assert_unreached("exception should have been thrown"); }, "exception thrown from attribute getter is associated with the correct global environment"); +// feature: Node.appendChild (operation) + test(function() { var func = iframe.contentWindow.Node.prototype.appendChild; try { @@ -37,6 +41,8 @@ assert_unreached("exception should have been thrown"); }, "exception thrown from operation is associated with the correct global environment"); +// feature: Uint8Array (indexed property setter) + test(function() { var a = new iframe.contentWindow.Uint8Array(1); try { @@ -47,6 +53,8 @@ assert_unreached("exception should have been thrown"); }, "exception thrown from indexed property is associated with the correct global environment"); +// feature: Event (interface) (with [Constructor]) + test(function() { try { new iframe.contentWindow.Event(); @@ -56,6 +64,8 @@ assert_unreached("exception should have been thrown"); }, "exception thrown from constructor is associated with the correct global environment"); +// feature: HTMLImageElement (interface) (with [NamedConstructor]) + test(function() { try { new iframe.contentWindow.Image({ toString: function() { return { } }, value: function() { return { } } }); @@ -65,6 +75,8 @@ assert_unreached("exception should have been thrown"); }, "exception thrown from named constructor is associated with the correct global environment"); +// feature: Location (stringifier) + test(function() { try { iframe.contentWindow.Location.prototype.toString.call(document); diff --git a/WebIDL/tests/submissions/heycam/union-001.html b/WebIDL/tests/submissions/heycam/union-001.html index 72cdd6b55aee79..e04f9558415746 100644 --- a/WebIDL/tests/submissions/heycam/union-001.html +++ b/WebIDL/tests/submissions/heycam/union-001.html @@ -24,6 +24,8 @@ // In this test we're using the second argument of HTMLSelectElement.add, // which is of type (HTMLElement or long)?. +// feature: HTMLSelectElement.add (operation) (with argument of a union type) + function makeSelect() { var select = document.createElement("select"); select.appendChild(document.createElement("option")); diff --git a/WebIDL/tests/submissions/heycam/unrestricted-double-001.html b/WebIDL/tests/submissions/heycam/unrestricted-double-001.html index 6d4b75b5364623..0dcb8a6eb18e1a 100644 --- a/WebIDL/tests/submissions/heycam/unrestricted-double-001.html +++ b/WebIDL/tests/submissions/heycam/unrestricted-double-001.html @@ -45,6 +45,8 @@ 1.0000001788139343, 1.0000001788139343, "1.0000001788139343" ]; +// feature: HTMLInputElement.valueAsNumber (attribute) (writable, of type unrestricted double) + var input = document.createElement("input"); input.setAttribute("type", "number"); diff --git a/WebIDL/tests/submissions/heycam/unrestricted-double-002.html b/WebIDL/tests/submissions/heycam/unrestricted-double-002.html index bcb0b523c6c399..6f7ea43639399d 100644 --- a/WebIDL/tests/submissions/heycam/unrestricted-double-002.html +++ b/WebIDL/tests/submissions/heycam/unrestricted-double-002.html @@ -44,6 +44,8 @@ 1.0000001788139343, 1.0000001788139343, "1.0000001788139343" ]; +// feature: Float64Array (indexed property setter) (of type unrestricted double) + var a = new Float64Array(1); for (var i = 0; i < values.length; i += 3) { diff --git a/WebIDL/tests/submissions/heycam/unrestricted-double-003.html b/WebIDL/tests/submissions/heycam/unrestricted-double-003.html index a0de966bde6ec0..00135cd8932016 100644 --- a/WebIDL/tests/submissions/heycam/unrestricted-double-003.html +++ b/WebIDL/tests/submissions/heycam/unrestricted-double-003.html @@ -11,6 +11,8 @@ // When converting a JS Number to an IDL unrestricted double, a NaN with // a specific bit pattern must be used. +// feature: Float64Array (indexed property setter) (of type unrestricted double) + function arrays_equal(a, b) { if (a.length != b.length) { return false; diff --git a/WebIDL/tests/submissions/heycam/unrestricted-double-004.html b/WebIDL/tests/submissions/heycam/unrestricted-double-004.html index d8f1446fc0ff78..822397c17949ef 100644 --- a/WebIDL/tests/submissions/heycam/unrestricted-double-004.html +++ b/WebIDL/tests/submissions/heycam/unrestricted-double-004.html @@ -10,12 +10,16 @@ // // IDL unrestricted double values are represented with JS number values. +// feature: HTMLInputElement.number (attribute) (of type unrestricted double) + test(function() { var e = document.createElement("input"); e.type = "number"; assert_equals(typeof e.valueAsNumber, "number"); }, "HTMLInputElement.valueAsNumber returns a value of the correct type"); +// feature: Float64Array (indexed property getter) (of type unrestricted double) + test(function() { var a = new Float64Array(1); assert_equals(typeof a[0], "number"); diff --git a/WebIDL/tests/submissions/heycam/unrestricted-float-001.html b/WebIDL/tests/submissions/heycam/unrestricted-float-001.html index ab0466c03fc09a..06f3b4a8f6ed38 100644 --- a/WebIDL/tests/submissions/heycam/unrestricted-float-001.html +++ b/WebIDL/tests/submissions/heycam/unrestricted-float-001.html @@ -44,6 +44,8 @@ 1.0000001788139343, 1.000000238418579, "1.0000001788139343" ]; +// feature: Float32Array (indexed property setter) (of type unrestricted float) + var a = new Float32Array(1); for (var i = 0; i < values.length; i += 3) { diff --git a/WebIDL/tests/submissions/heycam/unrestricted-float-002.html b/WebIDL/tests/submissions/heycam/unrestricted-float-002.html index 66abc0c3e683ba..a51ae7b6265c61 100644 --- a/WebIDL/tests/submissions/heycam/unrestricted-float-002.html +++ b/WebIDL/tests/submissions/heycam/unrestricted-float-002.html @@ -12,6 +12,8 @@ // for the finite values, only values that correspond to a single precision // value. +// feature: Float32Array (indexed property getter) (of type unrestricted float) + test(function() { var a = new Float32Array(1); a[0] = 1.1; diff --git a/WebIDL/tests/submissions/heycam/unsigned-long-001.html b/WebIDL/tests/submissions/heycam/unsigned-long-001.html index 894dbdd33d1cff..ccd115517a4e9d 100644 --- a/WebIDL/tests/submissions/heycam/unsigned-long-001.html +++ b/WebIDL/tests/submissions/heycam/unsigned-long-001.html @@ -41,6 +41,8 @@ 1.5, 1, "1.5" ]; +// feature: Document.createNodeIterator (operation) (with argument of type unsigned long) + for (var i = 0; i < values.length; i += 3) { var value = values[i]; var expected = values[i + 1]; diff --git a/WebIDL/tests/submissions/heycam/unsigned-long-002.html b/WebIDL/tests/submissions/heycam/unsigned-long-002.html index 33f1967e7cebff..de7c389deaf423 100644 --- a/WebIDL/tests/submissions/heycam/unsigned-long-002.html +++ b/WebIDL/tests/submissions/heycam/unsigned-long-002.html @@ -41,6 +41,8 @@ 1.5, 1, "1.5" ]; +// feature: WheelEvent (interface) (with constructor with argument of type unsigned long) + for (var i = 0; i < values.length; i += 3) { var value = values[i]; var expected = values[i + 1]; diff --git a/WebIDL/tests/submissions/heycam/unsigned-long-003.html b/WebIDL/tests/submissions/heycam/unsigned-long-003.html index 70d055f07e0464..53da0428e61e4b 100644 --- a/WebIDL/tests/submissions/heycam/unsigned-long-003.html +++ b/WebIDL/tests/submissions/heycam/unsigned-long-003.html @@ -11,12 +11,16 @@ // IDL unsigned long values are represented as integer JS Number values in the // range [0, 4294967295]. +// feature: HTMLCollection.length (attribute) (of type unsigned long) + test(function() { var collection = document.getElementsByTagName("div"); assert_equals(typeof collection.length, "number"); assert_true(collection.length == Math.floor(collection.length) && collection.length >= 0 && collection.length <= 4294967296); }, "HTMLCollection.length returns a value of the correct type"); +// feature: WheelEvent.deltaMode (attribute) (of type unsigned long) + test(function() { var e = new WheelEvent("test"); assert_equals(typeof e.deltaMode, "number"); diff --git a/WebIDL/tests/submissions/heycam/unsigned-short-001.html b/WebIDL/tests/submissions/heycam/unsigned-short-001.html index a4cc90bbd87f30..3e306557e56193 100644 --- a/WebIDL/tests/submissions/heycam/unsigned-short-001.html +++ b/WebIDL/tests/submissions/heycam/unsigned-short-001.html @@ -40,6 +40,8 @@ 1.5, 1, "1.5" ]; +// feature: CloseEvent (interface) (with constructor with argument of type unsigned short) + for (var i = 0; i < values.length; i += 3) { var value = values[i]; var expected = values[i + 1]; diff --git a/WebIDL/tests/submissions/heycam/unsigned-short-002.html b/WebIDL/tests/submissions/heycam/unsigned-short-002.html index 7c57d8c103ef86..cd63955b9e0ae6 100644 --- a/WebIDL/tests/submissions/heycam/unsigned-short-002.html +++ b/WebIDL/tests/submissions/heycam/unsigned-short-002.html @@ -48,6 +48,8 @@ 16777219, 3, "16777219" ]; +// feature: Range.compareBoundaryPoints (operation) (with argument of type unsigned short) + var node = document.getElementById("span").firstChild; function makeRange(start, end) { diff --git a/WebIDL/tests/submissions/heycam/unsigned-short-003.html b/WebIDL/tests/submissions/heycam/unsigned-short-003.html index c7472e6c5c9f9f..7aa6255026b5da 100644 --- a/WebIDL/tests/submissions/heycam/unsigned-short-003.html +++ b/WebIDL/tests/submissions/heycam/unsigned-short-003.html @@ -11,12 +11,16 @@ // IDL unsigned short values are represented as integer JS Number values in the // range [0, 65536]. +// feature: CloseEvent.code (attribute) (of type unsigned short) + test(function() { var event = new CloseEvent("test"); assert_equals(typeof event.code, "number"); assert_true(event.code == Math.floor(event.code) && event.code >= 0 && event.code <= 65535); }, "CloseEvent.code returns a value of the correct type"); +// feature: WebSocket.readyState (attribute) (of type unsigned short) + test(function() { var ws = new WebSocket("wss://test.invalid"); assert_equals(typeof ws.readyState, "number"); diff --git a/WebIDL/tests/submissions/heycam/void-001.html b/WebIDL/tests/submissions/heycam/void-001.html index 1c4b222e4f1662..838df0042a29a9 100644 --- a/WebIDL/tests/submissions/heycam/void-001.html +++ b/WebIDL/tests/submissions/heycam/void-001.html @@ -10,10 +10,14 @@ // // Operations defined with a return type of void return undefined. +// feature: HTMLElement.click (operation) (with return type void) + test(function() { assert_equals(document.documentElement.click(), undefined); }, "HTMLElement.click() returns undefined"); +// feature: HTMSelectLElement.add (operation) (with return type void) + test(function() { assert_equals(document.createElement("select").add(document.createElement("option")), undefined); }, "HTMLSelectElement.add() returns undefined"); From b05c3667ad51088250289c73bf5b21e8de3459a3 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 13 May 2013 11:42:22 +1000 Subject: [PATCH 089/116] Update notes on features to use. --- WebIDL/tests/submissions/heycam/features.txt | 163 +++++++++++++++++-- 1 file changed, 151 insertions(+), 12 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/features.txt b/WebIDL/tests/submissions/heycam/features.txt index edeb9f9b1d4770..7cf833a198364f 100644 --- a/WebIDL/tests/submissions/heycam/features.txt +++ b/WebIDL/tests/submissions/heycam/features.txt @@ -45,7 +45,7 @@ attribute that inherits its getter ?? stringifier on DOMString attribute - URLUtils.href - http://url.spec.whatwg.org/#urlutils + URLUtils.href (HTMLAnchorElement) - http://url.spec.whatwg.org/#urlutils ?? regular operation @@ -53,11 +53,12 @@ regular operation Node.appendChild - http://dom.spec.whatwg.org/#node static operation - ?? + URL.createObjectURL - File API + CSS.supports - ... variadic operation - Document.write - http://www.whatwg.org/specs/web-apps/current-work/#document - ParentNode.append - http://dom.spec.whatwg.org/#parentnode (too new?) + DOMTokenList.add - ... + WindowTimers.setTimeout - ... optional argument Window.postMessage - http://www.whatwg.org/specs/web-apps/current-work/#window @@ -277,6 +278,7 @@ operation argument extended attributes: Uint8ClampedArray.set - http://www.khronos.org/registry/typedarray/specs/latest/#7.1 [EnforceRange] + (there are some uses in IndexedDB) ?? [TreatNullAs] @@ -335,9 +337,121 @@ Binding 4.2 ECMAScript type mapping -* any, void, boolean, byte, octet, short, unsigned short, long, unsigned long, long long, unsigned long long, float, unrestricted float, double, unrestricted double, DOMString, object, interface type, dictionary type (order of member evaluation), enumeration type, callback function type, nullable, sequence, array, union, Date, +* any + CustomEvent.initCustomEvent - http://dom.spec.whatwg.org/#interface-customevent + CustomEvent.detail - http://dom.spec.whatwg.org/#interface-customevent - TBD +* void + * operations returning void return undefined + +* boolean + Event.initEvent - http://dom.spec.whatwg.org/#event + Event.bubbles - http://dom.spec.whatwg.org/#event + Document.hasFocus - http://www.whatwg.org/specs/web-apps/current-work/#document + +* byte + Int8Array indexed property getter and setter - http://www.khronos.org/registry/typedarray/specs/latest/#7 + ?? + +* octet + Uint8Array indexed property getter and setter - http://www.khronos.org/registry/typedarray/specs/latest/#7 + ?? + +* short + Int16Array indexed property getter and setter - http://www.khronos.org/registry/typedarray/specs/latest/#7 + ?? + +* unsigned short + CloseEvent constructor, code - http://www.whatwg.org/specs/web-apps/current-work/#event-definitions-3 + Range.compareBoundaryPoints - http://dom.spec.whatwg.org/#range + WebSocket.readyState - http://www.whatwg.org/specs/web-apps/current-work/#websocket + +* long + HTMLPreElement.width - http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis + HTMLElement.tabIndex - http://www.whatwg.org/specs/web-apps/current-work/#htmlelement + +* unsigned long + Document.createNodeIterator - http://dom.spec.whatwg.org/#document + WheelEvent constructor and .deltaMode - http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent + HTMLCollection.length - ... + +* long long + ?? + +* unsigned long long + (IDBVersionChangeEvent has an unsigned long long member, but the constructor for this event doesn't seem to be implemented anywhere yet) + ?? + +* float + SVGNumber.value - https://svgwg.org/svg2-draft/types.html#InterfaceSVGNumber + SVGMatrix.{translate,e} - https://svgwg.org/svg2-draft/coords.html#InterfaceSVGMatrix + +* unrestricted float + Float32Array indexed property getter and setter - http://www.khronos.org/registry/typedarray/specs/latest/#7 + ?? + +* double + HTMLProgressElement.value - http://www.whatwg.org/specs/web-apps/current-work/#htmlprogresselement + HTMLMeterElement.min - http://www.whatwg.org/specs/web-apps/current-work/#htmlmeterelement + +* unrestricted double + HTMLInputElement.valueAsNumber - http://www.whatwg.org/specs/web-apps/current-work/#htmlelement + Float64Array indexed property getter and setter - http://www.khronos.org/registry/typedarray/specs/latest/#7 + +* DOMString + Attr.value - http://dom.spec.whatwg.org/#interface-attr + CharacterData.appendData - http://dom.spec.whatwg.org/#characterdata + Node.nodeName - http://dom.spec.whatwg.org/#interface-node + +* object + TrackEvent.track - http://www.whatwg.org/specs/web-apps/current-work/#event-definitions + ?? + +* interface type + Node.appendChild - http://dom.spec.whatwg.org/#node + SVGPoint.matrixTransform - https://svgwg.org/svg2-draft/coords.html#InterfaceSVGPoint + EventTarget.addEventListener - http://dom.spec.whatwg.org/#eventtarget + Node.parentNode - ... + SVGSVGElement.createSVGPoint - ... + + is there a multiple operation callback interface we can use? + +* dictionary type + CustomEvent constructor - ... + WebGLRenderingContext.getContextAttributes() - http://www.khronos.org/registry/webgl/specs/latest/#5.2 + (would be good to test partial dictionaries, but the only one I'm aware of is MouseEvent in HTML, but that's not implemented) + +* enumeration type + CanvasFillRule - http://www.whatwg.org/specs/web-apps/current-work/#canvasfillrule + (is there a writable attribute of an enum type to test?) + (and one to test returning enum alues) + +* callback function type + MutationObserver constructor - http://dom.spec.whatwg.org/#mutationobserver + GlobalEventHandlers.onclick - http://www.whatwg.org/specs/web-apps/current-work/#idl-definitions + +* nullable + Node.textContent - http://dom.spec.whatwg.org/#node + Node.insertBefore - http://dom.spec.whatwg.org/#node + Document.getElementById - ... + +* sequence + MutationObserverInit - http://dom.spec.whatwg.org/#mutationobserver (would be nice to have platform array object to pass in) + MutationCallback - ... + ?? + +* array + ?? + +* union + HTMLSelectElement.add - http://www.whatwg.org/specs/web-apps/current-work/#htmlselectelement + ?? + +* Date + HTMLInputElement.valueAsDate - http://www.whatwg.org/specs/web-apps/current-work/#htmlinputelement + ?? + + DONE 4.2.24.1 Platform array object [[GetOwnProperty]] method @@ -346,7 +460,7 @@ Binding * invalid array index * other properties - TBD + ?? 4.2.24.2 Platform array object [[DefineOwnProperty]] method @@ -355,13 +469,12 @@ Binding * invalid array index * other properties - TBD + ?? 4.2.24.3 Platform array object [[Delete]] method ... - - TBD + ?? 4.3 [ArrayClass] 4.3.2 [Clamp] @@ -400,8 +513,22 @@ Binding * if [Constructor], .length is [[Writable]] = false, [[Enumerable]] = false, [[Configurable]] = false, Number. * .length is 0 if not [Constructor] ** how can this be? + simple constructors (with no overloading or optional arguments) + ArrayBuffer - ... + Range - ... + + simple constructors (no overloading but with optional arguments) + Event - ... + WebSocket - ... + + overloaded constructors + Uint8Array + Blob - File API + 4.4.1.2 Interface object [[HasInstance]] method + TBD + 4.4.2 Named constructors * same .length as for [[Call]] @@ -443,6 +570,8 @@ Binding * assigning invalid enumeration types is ignored * .length = 1 + nothing for assigning to an enum + 4.4.7 Operations * property exists on the interface prototype object (if regular) or interface object (if static) @@ -455,8 +584,14 @@ Binding * stringifier on attribute calls [[Get]] with the attribute's property name * stringifier on an operation gets the function with [[Get]] and calls it + nothing to test for a distinguishing argument index > 0 + nothing to test for "stringifier" on an operation + 4.5 Implements statement + URLUtils.href + afaict there isn't a use of implements with more than one consequential interface + 4.6 Platform objects implementing interfaces * primary interface determines class string @@ -469,11 +604,14 @@ Binding * named property visibility algorithm, looks at [Unforgeable], supported property name, [OverrideBuiltins], ... 4.6.2 Platform object [[GetOwnProperty]] method -4.6.2 Platform object [[DefineOwnProperty]] method -4.6.3 Platform object [[Delete]] method +4.6.3 Platform object [[DefineOwnProperty]] method +4.6.4 Platform object [[Delete]] method * ... indexed, named properties ... + can't test an object with a named property setter but no creator + can't test indexed property deleter + 4.6.5 Platform object [[Call]] method * legacy caller @@ -567,6 +705,7 @@ named constructor object attribute getter attribute setter operation Function +static operation Function stringifier Function exception interface object exception interface prototype object From 93eb4fdd84bfd7740f9e42d650648f5631d5a0e0 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 13 May 2013 11:42:38 +1000 Subject: [PATCH 090/116] Rename features.txt to notes.txt. --- WebIDL/tests/submissions/heycam/{features.txt => notes.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename WebIDL/tests/submissions/heycam/{features.txt => notes.txt} (100%) diff --git a/WebIDL/tests/submissions/heycam/features.txt b/WebIDL/tests/submissions/heycam/notes.txt similarity index 100% rename from WebIDL/tests/submissions/heycam/features.txt rename to WebIDL/tests/submissions/heycam/notes.txt From cf13916be682a2b0523afbd27673aea2242c5440 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 13 May 2013 11:47:54 +1000 Subject: [PATCH 091/116] Record the features used in tests. --- WebIDL/tests/submissions/heycam/features.txt | 581 ++++++++++++++++++ .../submissions/heycam/gather-features.pl | 53 ++ 2 files changed, 634 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/features.txt create mode 100644 WebIDL/tests/submissions/heycam/gather-features.pl diff --git a/WebIDL/tests/submissions/heycam/features.txt b/WebIDL/tests/submissions/heycam/features.txt new file mode 100644 index 00000000000000..32afaf6ff90fbe --- /dev/null +++ b/WebIDL/tests/submissions/heycam/features.txt @@ -0,0 +1,581 @@ +# This file is generated by gather-features.pl. + +ArrayBuffer (interface) + with [Constructor], and no overloading or optional arguments + Constructor-002.html +Attr.value (attribute) + of type DOMString + DOMString-003.html + writable, of type DOMString + DOMString-001.html +CSS.supports (static operation) + functions-001.html + initial-001.html + initial-002.html +CanvasRenderingContext2D.createImageData (operation) + overloaded + operation-004.html +CanvasRenderingContext2D.drawImage (operation) + overloaded + operation-001.html + operation-004.html +CanvasRenderingContext2D.fill (operation, with argument of an enum type) + enum-type-001.html +CharacterData.appendData (attribute) + writable, of type DOMString + DOMString-002.html +CharacterData.data (attribute) + with [TreatNullAs=EmptyString] + TreatNullAs-001.html +CloseEvent (interface) + with constructor with argument of type unsigned short + unsigned-short-001.html +CloseEvent.code (attribute) + of type unsigned short + unsigned-short-003.html +CustomEvent (interface) + with constructor with argument of a dictionary type + dictionary-type-001.html +CustomEvent.initCustomEvent (operation) + with argument of type any + any-001.html +DOMException (exception) + class-string-001.html + class-string-001.html + exception-interface-object-001.html + exception-interface-object-002.html + exception-interface-prototype-object-001.html + exception-object-001.html + extensible-001.html + extensible-001.html + initial-001.html + initial-002.html + without [NoInterfaceObject] + class-string-001.html + exception-001.html + extensible-001.html + functions-001.html + initial-001.html + initial-002.html +DOMException.INVALID_STATE_ERR (constant) + on an exception + constant-003.html +DOMException.code (exception field) + class-string-001.html + exception-field-001.html + extensible-001.html + functions-001.html + initial-001.html + initial-002.html +DOMImplementation (interface) + interface-object-001.html + without inheritance + class-string-001.html + extensible-001.html + initial-001.html + initial-002.html + without inheritance, primary interface + class-string-001.html + extensible-001.html + without inheritance, without [NoInterfaceObject] + class-string-001.html + extensible-001.html + functions-001.html + initial-001.html + initial-002.html + interface-001.html + interface-prototype-object-001.html +DOMImplementation.createDocument (operation) + with [TreatNullAs=EmptyString] on an argument + TreatNullAs-002.html +DOMImplementation.createHTMLDocument (operation) + with optional argument + operation-001.html + operation-002.html +DOMStringMap (interface) + does not support indexed properties, supports named properties + property-enumeration-001.html + supports named properties + named-properties-001.html +DOMStringMap (named property creator) + named-properties-004.html +DOMStringMap (named property deleter) + named-properties-005.html +DOMStringMap (named property getter) + has a named property setter + named-properties-002.html +DOMTokenList (interface) + supports indexed properties, does not have an indexed property setter + indexed-properties-003.html +DOMTokenList (stringifier) + class-string-001.html + extensible-001.html + functions-001.html + initial-001.html + initial-002.html + stringifier-001.html +DOMTokenList.add (operation) + variadic + operation-001.html + operation-003.html +Document (partial interface) + with [OverrideBuiltins] + OverrideBuiltins-002.html +Document.createNodeIterator (operation) + with argument of type unsigned long + unsigned-long-001.html +Document.getElementById (operation) + with a nullable return type + nullable-003.html +Document.hasFocus (operation) + with return type boolean + boolean-002.html +Document.location (attribute) + with [PutForwards] + PutForwards-001.html +Document.onclick (attribute) + with [TreatNonCallableAsNull] + TreatNonCallableAsNull-001.html +Document.onerror (attribute) + with [TreatNonCallableAsNull] + TreatNonCallableAsNull-001.html +Document.onreadystatechange (attribute) + with [LenientThis] + LenientThis-001.html +Document.title (attribute) + writable + class-string-001.html + class-string-001.html + extensible-001.html + extensible-001.html + functions-001.html + functions-001.html + initial-001.html + initial-001.html + initial-002.html + initial-002.html + writable, without [Unforgeable] + attribute-001.html + attribute-005.html +Element (interface) + with inheritance + class-string-001.html + extensible-001.html + initial-001.html + initial-002.html + with inheritance, without [NoInterfaceObject] + class-string-001.html + extensible-001.html + functions-001.html + initial-001.html + initial-002.html + interface-001.html + interface-prototype-object-001.html + without [Constructor] + Constructor-001.html +Element.className (attribute) + without [TreatNullAs] + TreatNullAs-001.html +Event (interface) + with [Constructor] + Constructor-001.html + throwing-001.html + with [Constructor] and optional arguments + Constructor-003.html + with inheritance, with [Constructor] + functions-001.html +Event.bubbles (attribute) + of type boolean + boolean-002.html +Event.initEvent (operation) + with argument of type boolean + boolean-001.html +Event.isTrusted (attribute) + with [Unforgeable] + Unforgeable-001.html +EventTarget.addEventListener (operation) + with argument of a single operation callback interface type + interface-type-003.html +Float32Array (indexed property getter) + of type unrestricted float + unrestricted-float-002.html +Float32Array (indexed property setter) + of type unrestricted float + unrestricted-float-001.html +Float64Array (indexed property getter) + of type unrestricted double + unrestricted-double-004.html +Float64Array (indexed property setter) + of type unrestricted double + unrestricted-double-002.html + unrestricted-double-003.html +FormData.append (operation) + overloaded + operation-001.html +GlobalEventHandlers.onclick (attribute) + of a callback function type + callback-function-type-003.html + writable, of a callback function type + callback-function-type-002.html +GlobalEventHandlers.onmouseenter (attribute) + with [LenientThis] + LenientThis-001.html +HTMLAnchorElement (stringifier) + functions-001.html + initial-001.html + initial-002.html + stringifier-001.html + stringifier-002.html +HTMLAudioElement (interface) + with [NamedConstructor] + class-string-001.html + extensible-001.html + functions-001.html + initial-001.html + initial-002.html + NamedConstructor-001.html +HTMLCollection (interface) + interface-object-001.html + supports indexed properties, supports named properties + property-enumeration-001.html + supports named properties, does not have a named property setter, does not have a named property creator + named-properties-003.html + withogut inheritance, without [NoInterfaceObject] + functions-001.html + without inheritance + class-string-001.html + extensible-001.html + initial-001.html + initial-002.html + without inheritance, primary interface + class-string-001.html + extensible-001.html + without inheritance, without [NoInterfaceObject] + class-string-001.html + extensible-001.html + initial-001.html + initial-002.html + interface-001.html + interface-prototype-object-001.html +HTMLCollection (named property getter) + does not have a named property setter, supports indexed properties + named-properties-002.html +HTMLCollection.length (attribute) + of type unsigned long + unsigned-long-003.html +HTMLDivElement (interface) + with inheritance, primary interface + class-string-001.html + extensible-001.html +HTMLElement.click (operation) + class-string-001.html + extensible-001.html + functions-001.html + initial-001.html + initial-002.html + operation-001.html + with return type void + void-001.html +HTMLElement.style (attribute) + with [PutForwards] + PutForwards-001.html +HTMLElement.tabIndex (attribute) + of type long + long-003.html + writable, of type long + long-002.html +HTMLFormElement (attribute) + read only, without [Unforgeable] + attribute-004.html +HTMLFormElement (interface) + with [OverrideBuiltins] + OverrideBuiltins-001.html +HTMLFormElement.length (attribute) + read only + class-string-001.html + extensible-001.html + functions-001.html + initial-001.html + initial-002.html +HTMLFrameElement.marginWidth (attribute) + with [TreatNullAs=EmptyString] + TreatNullAs-001.html +HTMLImageElement (interface) + with [NamedConstructor] + class-string-001.html + extensible-001.html + functions-001.html + initial-001.html + initial-002.html + NamedConstructor-001.html + throwing-001.html +HTMLInputElement.number (attribute) + of type unrestricted double + unrestricted-double-004.html +HTMLInputElement.valueAsDate (attribute) + of type Date + Date-001.html + Date-002.html +HTMLInputElement.valueAsNumber (attribute) + writable, of type unrestricted double + unrestricted-double-001.html +HTMLMediaElement.NETWORK_IDLE (constant) + constant-001.html +HTMLMeterElement.min (attribute) + writable, of type double + double-002.html +HTMLObjectElement (interface) + with a legacy caller + legacy-caller-001.html +HTMLOptionsCollection (indexed property creator) + indexed-properties-005.html +HTMLPreElement.width (attribute) + of type long + long-003.html + writable, of type long + long-001.html +HTMLProgressElement.value (attribute) + of type double + double-003.html + writable, of type double + double-001.html +HTMLSelectElement (indexed property creator) + indexed-properties-005.html +HTMLSelectElement (indexed property getter) + has an indexed property setter + indexed-properties-002.html +HTMLSelectElement.add (operation) + with argument of a union type + union-001.html + with optional argument default value + operation-001.html +HTMLSelectElement.length (attribute) + throwing-001.html + writable + class-string-001.html + class-string-001.html + extensible-001.html + extensible-001.html + functions-001.html + functions-001.html + initial-001.html + initial-001.html + initial-002.html + initial-002.html + writable, without [Unforgeable] + attribute-002.html + attribute-006.html +HTMSelectLElement.add (operation) + with return type void + void-001.html +Int16Array (indexed property getter) + of type short + short-002.html +Int16Array (indexed property setter) + of type short + short-001.html +Int8Array (indexed property getter) + of type byte + byte-002.html +Int8Array (indexed property setter) + of type byte + byte-001.html +Location (stringifier) + throwing-001.html +MutationCallback (operation) + on a callback interface, of a sequence type + sequence-002.html +MutationObserver (interface) + with [Constructor] with argument of a callback function type + callback-function-type-001.html +MutationObserverInit.attributeFilter (dictionary member) + of a sequence type + sequence-001.html +NavigatorID (interface) + with [NoInterfaceObject] + NoInterfaceObject-001.html +Node.appendChild (operation) + class-string-001.html + extensible-001.html + functions-001.html + initial-001.html + initial-002.html + operation-001.html + throwing-001.html + with argument of an interface type + interface-type-001.html +Node.cloneNode (operation) + with optional argument default value + operation-001.html +Node.insertBefore (attribute) + writable, of a nullable interface type + nullable-002.html +Node.nodeName (attribute) + of type DOMString + DOMString-003.html +Node.parentNode (attribute) + of an interface type + interface-type-004.html + read only + class-string-001.html + extensible-001.html + functions-001.html + initial-001.html + initial-002.html + read only, without [Unforgeable] + attribute-003.html +Node.textContext (attribute) + writable, of type DOMString? + nullable-001.html +NodeFilter (callback interface) + with constants + interface-001.html + interface-object-002.html +NodeFilter.SHOW_ALL (constant) + on a callback interface + constant-002.html +NodeList (indexed property getter) + does not have an indexed property setter + indexed-properties-002.html +NodeList (interface) + supports indexed properties + indexed-properties-001.html + supports indexed properties, does not have an indexed property setter, does not have an indexed property creator + indexed-properties-003.html + with [ArrayClass] + ArrayClass-001.html +Range (interface) + with [Constructor], and no overloading or optional arguments + Constructor-002.html +Range.compareBoundaryPoints (operation) + with argument of type unsigned short + unsigned-short-002.html +SVGLength.SVG_LENGTHTYPE_NUMBER (constant) + constant-001.html +SVGMatrix.a (attribute) + of type float + float-003.html +SVGMatrix.translate (operation) + with argument of type float + float-002.html +SVGNumber.value (attribute) + of type float + float-003.html + writable, of type float + float-001.html +SVGPoint.matrixTransform (operation) + with argument of an interface type + interface-type-002.html +SVGSVGElement.createSVGPoint (operation) + with interface type return type + interface-type-004.html +Storage (interface) + supports named properties + named-properties-001.html +Storage (named property creator) + named-properties-004.html +Storage (named property deleter) + named-properties-005.html +TrackEvent.track (attribute) + of type object? + object-002.html +TrackEventInit.track (dictionary member) + of type object? + object-001.html +UIEvent (interface) + with inheritance + class-string-001.html + extensible-001.html + initial-001.html + initial-002.html + with inheritance, primary interface + class-string-001.html + extensible-001.html + with inheritance, without [NoInterfaceObject] + class-string-001.html + extensible-001.html + initial-001.html + initial-002.html + interface-001.html + interface-prototype-object-001.html + witih inheritance, without [NoInterfaceObject] + functions-001.html +URL.createObjectURL (static operation) + functions-001.html + initial-001.html + initial-002.html +URLUtils (interface) + used on RHS of implements statement + implements-001.html +Uint8Array (indexed property getter) + of type octet + octet-002.html +Uint8Array (indexed property setter) + throwing-001.html + of type octet + octet-001.html +Uint8Array (interface) + supports indexed properties + indexed-properties-001.html + supports indexed properties, does not support named properties + property-enumeration-001.html + supports indexed properties, has an indexed property setter, does not have an indexed property creator + indexed-properties-004.html +Uint8ClampedArray (indexed property setter) + with [Clamp] + Clamp-001.html +WebGLRenderingContext.getContextAttributes (operation) + with dictionary type return type + dictionary-type-002.html +WebSocket (interface) + with [Constructor] and optional arguments + Constructor-003.html +WebSocket.close (operation) + with [Clamp] on an argument + Clamp-001.html +WebSocket.readyState (attribute) + of type unsigned short + unsigned-short-003.html +WheelEvent (interface) + with constructor with argument of type unsigned long + unsigned-long-002.html +WheelEvent.deltaMode (attribute) + of type unsigned long + unsigned-long-003.html +Window (interface) + with [NamedPropertiesObject] + class-string-001.html + extensible-001.html + initial-001.html + initial-002.html + NamedPropertiesObject-001.html + NamedPropertiesObject-002.html + NamedPropertiesObject-003.html + NamedPropertiesObject-004.html +Window.document (attribute) + with [Unforgeable] + Unforgeable-001.html +Window.length (attribute) + with [Replaceable] + Replaceable-001.html +Window.postMessage (operation) + with optional argument + operation-001.html + operation-002.html +Window.self (attribute) + with [Replaceable] + Replaceable-001.html +Window.setTimeout (operation) + variadic + operation-001.html +WindowTimers (interface) + with [NoInterfaceObject] + NoInterfaceObject-001.html +WindowTimers.setTimeout (operation) + variadic + operation-003.html +XMLHttpRequest (interface) + with [Constructor] + Constructor-001.html + with inheritance, with [Constructor] + functions-001.html diff --git a/WebIDL/tests/submissions/heycam/gather-features.pl b/WebIDL/tests/submissions/heycam/gather-features.pl new file mode 100644 index 00000000000000..220b9f159fd608 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/gather-features.pl @@ -0,0 +1,53 @@ +#!/usr/bin/perl -w + +use strict; + +my %features = (); + +sub read_features { + my $fh; + my $fn = shift; + open $fh, $fn; + while (<$fh>) { + next unless s/^\s*\/\/ feature: //; + /^([^(]*) \(([^)]*)\)(?: \(([^)]*)\))?$/ or die; + my $key = "$1 ($2)"; + my $conditions = $3; + $conditions = '' unless defined $conditions; + $features{$key} = { } unless defined $features{$key}; + $features{$key}{$conditions} = [] unless defined $features{$key}{$conditions}; + push @{$features{$key}{$conditions}}, $fn; + } + close $fh; +} + +sub read_tests { + my $fh; + my $fn; + + opendir $fh, '.'; + while ($fn = readdir $fh) { + next unless -f $fn && $fn =~ /\.html$/; + read_features($fn); + } + closedir $fh; +} + +sub print_features { + my $fh; + open $fh, '>features.txt'; + print $fh "# This file is generated by gather-features.pl.\n\n"; + for my $key (sort keys %features) { + print $fh "$key\n"; + for my $condition (sort keys %{$features{$key}}) { + print $fh " $condition\n" unless $condition eq ''; + for my $test (@{$features{$key}{$condition}}) { + print $fh " $test\n"; + } + } + } + close $fh; +} + +read_tests(); +print_features(); From 86d4680471d653dde3392b9bc771a7178a227527 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 13 May 2013 11:50:59 +1000 Subject: [PATCH 092/116] Typo. --- WebIDL/tests/submissions/heycam/features.txt | 3 +-- WebIDL/tests/submissions/heycam/functions-001.html | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/features.txt b/WebIDL/tests/submissions/heycam/features.txt index 32afaf6ff90fbe..2d6b5aea50f9c2 100644 --- a/WebIDL/tests/submissions/heycam/features.txt +++ b/WebIDL/tests/submissions/heycam/features.txt @@ -494,12 +494,11 @@ UIEvent (interface) with inheritance, without [NoInterfaceObject] class-string-001.html extensible-001.html + functions-001.html initial-001.html initial-002.html interface-001.html interface-prototype-object-001.html - witih inheritance, without [NoInterfaceObject] - functions-001.html URL.createObjectURL (static operation) functions-001.html initial-001.html diff --git a/WebIDL/tests/submissions/heycam/functions-001.html b/WebIDL/tests/submissions/heycam/functions-001.html index ee45b9986f4566..0d153de4c3f708 100644 --- a/WebIDL/tests/submissions/heycam/functions-001.html +++ b/WebIDL/tests/submissions/heycam/functions-001.html @@ -22,7 +22,7 @@ interfaceObject("HTMLCollection"), "HTMLCollection interface object", // feature: Element (interface) (with inheritance, without [NoInterfaceObject]) interfaceObject("Element"), "Element interface object", - // feature: UIEvent (interface) (witih inheritance, without [NoInterfaceObject]) + // feature: UIEvent (interface) (with inheritance, without [NoInterfaceObject]) interfaceObject("UIEvent"), "UIEvent interface object", // feature: Event (interface) (with inheritance, with [Constructor]) interfaceObject("Event"), "Event interface object", From 8cbc70af753fe1ff0c919c6fd53694a439a356f7 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 13 May 2013 11:53:51 +1000 Subject: [PATCH 093/116] Record use of HTMLAnchorElement stringifier as URLUtils stringifier. --- WebIDL/tests/submissions/heycam/features.txt | 12 ++++++------ WebIDL/tests/submissions/heycam/functions-001.html | 2 +- WebIDL/tests/submissions/heycam/initial-001.html | 2 +- WebIDL/tests/submissions/heycam/initial-002.html | 2 +- WebIDL/tests/submissions/heycam/stringifier-001.html | 2 +- WebIDL/tests/submissions/heycam/stringifier-002.html | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/features.txt b/WebIDL/tests/submissions/heycam/features.txt index 2d6b5aea50f9c2..d988e151730d6c 100644 --- a/WebIDL/tests/submissions/heycam/features.txt +++ b/WebIDL/tests/submissions/heycam/features.txt @@ -220,12 +220,6 @@ GlobalEventHandlers.onclick (attribute) GlobalEventHandlers.onmouseenter (attribute) with [LenientThis] LenientThis-001.html -HTMLAnchorElement (stringifier) - functions-001.html - initial-001.html - initial-002.html - stringifier-001.html - stringifier-002.html HTMLAudioElement (interface) with [NamedConstructor] class-string-001.html @@ -506,6 +500,12 @@ URL.createObjectURL (static operation) URLUtils (interface) used on RHS of implements statement implements-001.html +URLUtils (stringifier) + functions-001.html + initial-001.html + initial-002.html + stringifier-001.html + stringifier-002.html Uint8Array (indexed property getter) of type octet octet-002.html diff --git a/WebIDL/tests/submissions/heycam/functions-001.html b/WebIDL/tests/submissions/heycam/functions-001.html index 0d153de4c3f708..5802fe0b91ef4a 100644 --- a/WebIDL/tests/submissions/heycam/functions-001.html +++ b/WebIDL/tests/submissions/heycam/functions-001.html @@ -82,7 +82,7 @@ // feature: DOMTokenList (stringifier) stringifier("DOMTokenList"), "DOMTokenList stringifier function", - // feature: HTMLAnchorElement (stringifier) + // feature: URLUtils (stringifier) stringifier("HTMLAnchorElement"), "HTMLAnchorElement stringifier function", diff --git a/WebIDL/tests/submissions/heycam/initial-001.html b/WebIDL/tests/submissions/heycam/initial-001.html index 3a0e491bd5c073..49b88915d3cbbf 100644 --- a/WebIDL/tests/submissions/heycam/initial-001.html +++ b/WebIDL/tests/submissions/heycam/initial-001.html @@ -100,7 +100,7 @@ // feature: DOMTokenList (stringifier) stringifier("DOMTokenList"), stringifier("DOMTokenList", w), "DOMTokenList stringifier function", - // feature: HTMLAnchorElement (stringifier) + // feature: URLUtils (stringifier) stringifier("HTMLAnchorElement"), stringifier("HTMLAnchorElement", w), "HTMLAnchorElement stringifier function", diff --git a/WebIDL/tests/submissions/heycam/initial-002.html b/WebIDL/tests/submissions/heycam/initial-002.html index 155d9abf74ee57..8ed355ffaa3a4d 100644 --- a/WebIDL/tests/submissions/heycam/initial-002.html +++ b/WebIDL/tests/submissions/heycam/initial-002.html @@ -101,7 +101,7 @@ // feature: DOMTokenList (stringifier) stringifier("DOMTokenList"), stringifier("DOMTokenList", w), "DOMTokenList stringifier function", - // feature: HTMLAnchorElement (stringifier) + // feature: URLUtils (stringifier) stringifier("HTMLAnchorElement"), stringifier("HTMLAnchorElement", w), "HTMLAnchorElement stringifier function", diff --git a/WebIDL/tests/submissions/heycam/stringifier-001.html b/WebIDL/tests/submissions/heycam/stringifier-001.html index 89af3f18f266f5..3b07a6beca52dd 100644 --- a/WebIDL/tests/submissions/heycam/stringifier-001.html +++ b/WebIDL/tests/submissions/heycam/stringifier-001.html @@ -14,7 +14,7 @@ var stringifiers = [ - // feature: HTMLAnchorElement (stringifier) + // feature: URLUtils (stringifier) "HTMLAnchorElement", // feature: DOMTokenList (stringifier) diff --git a/WebIDL/tests/submissions/heycam/stringifier-002.html b/WebIDL/tests/submissions/heycam/stringifier-002.html index b2c4d48cb758ca..22d3cc9f7dc30c 100644 --- a/WebIDL/tests/submissions/heycam/stringifier-002.html +++ b/WebIDL/tests/submissions/heycam/stringifier-002.html @@ -13,7 +13,7 @@ // Function ignores any arguments passed to it. If applied to the wrong kind // of object, a TypeError is thrown. -// feature: HTMLAnchorElement (stringifier) +// feature: URLUtils (stringifier) var url = "http://test.invalid/somewhere"; From 6b337e7f1f7f67be636f75962d2d64b9e83595a2 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 13 May 2013 13:24:44 +1000 Subject: [PATCH 094/116] Add test for [[HasInstance]]. --- WebIDL/tests/submissions/heycam/features.txt | 2 + .../submissions/heycam/instanceof-001.html | 62 +++++++++++++++++++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 3 files changed, 65 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/instanceof-001.html diff --git a/WebIDL/tests/submissions/heycam/features.txt b/WebIDL/tests/submissions/heycam/features.txt index d988e151730d6c..42f6a131950208 100644 --- a/WebIDL/tests/submissions/heycam/features.txt +++ b/WebIDL/tests/submissions/heycam/features.txt @@ -68,6 +68,7 @@ DOMException.code (exception field) initial-001.html initial-002.html DOMImplementation (interface) + instanceof-001.html interface-object-001.html without inheritance class-string-001.html @@ -158,6 +159,7 @@ Document.title (attribute) attribute-001.html attribute-005.html Element (interface) + instanceof-001.html with inheritance class-string-001.html extensible-001.html diff --git a/WebIDL/tests/submissions/heycam/instanceof-001.html b/WebIDL/tests/submissions/heycam/instanceof-001.html new file mode 100644 index 00000000000000..cb4a5bed3199ec --- /dev/null +++ b/WebIDL/tests/submissions/heycam/instanceof-001.html @@ -0,0 +1,62 @@ + +[[HasInstance]] + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index f0022474735e96..65ba94e68083f5 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -67,6 +67,7 @@ indexed-properties-004.html indexed-properties-005.html initial-001.html initial-002.html +instanceof-001.html interface-001.html interface-object-001.html interface-object-002.html From 1c488e561c559541dc9fe71e1cb136d51baba81c Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 13 May 2013 13:42:18 +1000 Subject: [PATCH 095/116] Make gather-features.pl executable. --- WebIDL/tests/submissions/heycam/gather-features.pl | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 WebIDL/tests/submissions/heycam/gather-features.pl diff --git a/WebIDL/tests/submissions/heycam/gather-features.pl b/WebIDL/tests/submissions/heycam/gather-features.pl old mode 100644 new mode 100755 From 8b014c48d9e8589e4d929641057d426ec28c5f5d Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 13 May 2013 13:42:45 +1000 Subject: [PATCH 096/116] Add test for [EnforceRange]. --- .../submissions/heycam/EnforceRange-001.html | 26 +++++++++++++++++++ WebIDL/tests/submissions/heycam/features.txt | 3 +++ WebIDL/tests/submissions/heycam/manifest.txt | 1 + 3 files changed, 30 insertions(+) create mode 100644 WebIDL/tests/submissions/heycam/EnforceRange-001.html diff --git a/WebIDL/tests/submissions/heycam/EnforceRange-001.html b/WebIDL/tests/submissions/heycam/EnforceRange-001.html new file mode 100644 index 00000000000000..9c80a3dc66bb78 --- /dev/null +++ b/WebIDL/tests/submissions/heycam/EnforceRange-001.html @@ -0,0 +1,26 @@ + +[EnforceRange] + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/features.txt b/WebIDL/tests/submissions/heycam/features.txt index 42f6a131950208..993b7e645a5fdb 100644 --- a/WebIDL/tests/submissions/heycam/features.txt +++ b/WebIDL/tests/submissions/heycam/features.txt @@ -364,6 +364,9 @@ HTMLSelectElement.length (attribute) HTMSelectLElement.add (operation) with return type void void-001.html +IDBFactory.open (operation) + with [EnforceRange] on an argument + EnforceRange-001.html Int16Array (indexed property getter) of type short short-002.html diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 65ba94e68083f5..12621a27e9a6eb 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -9,6 +9,7 @@ DOMString-002.html DOMString-003.html Date-001.html Date-002.html +EnforceRange-001.html LenientThis-001.html NamedConstructor-001.html NamedPropertiesObject-001.html From ef417338282c192c6d8ba8eb64ce954e469c68cb Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 13 May 2013 13:43:06 +1000 Subject: [PATCH 097/116] Update notes on test coverage. --- WebIDL/tests/submissions/heycam/notes.txt | 764 ++-------------------- 1 file changed, 47 insertions(+), 717 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/notes.txt b/WebIDL/tests/submissions/heycam/notes.txt index 7cf833a198364f..7859b73dd25de3 100644 --- a/WebIDL/tests/submissions/heycam/notes.txt +++ b/WebIDL/tests/submissions/heycam/notes.txt @@ -1,717 +1,47 @@ -Some rough notes on features to use as the basis of Web IDL tests. - - -Features --------- - -interface - DOMImplementation - http://dom.spec.whatwg.org/#interface-domimplementation - HTMLCollection - http://dom.spec.whatwg.org/#interface-htmlcollection - -interface inheritance - Element - http://dom.spec.whatwg.org/#interface-element - UIEvent - http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-UIEvent - -callback interface - EventListener - http://dom.spec.whatwg.org/#eventlistener (single operation) - NodeFilter - http://dom.spec.whatwg.org/#nodefilter (single operation, plus consts) - (any multiple operation callback interfaces?) - -partial interface - Document deprecated things - http://www.whatwg.org/specs/web-apps/current-work/#Document-partial - HTMLAnchorElement deprecated things - http://www.whatwg.org/specs/web-apps/current-work/#HTMLAnchorElement-partial - -constant on a normal interface - HTMLMediaElement.NETWORK_IDLE - http://www.whatwg.org/specs/web-apps/current-work/#htmlmediaelement - SVGLength.SVG_LENGTHTYPE_NUMBER - https://svgwg.org/svg2-draft/types.html#InterfaceSVGLength - -constant on a callback interface - NodeFilter.SHOW_ALL - http://dom.spec.whatwg.org/#nodefilter - ?? - -constant on an exception - DOMException.INVALID_STATE_ERR - http://dom.spec.whatwg.org/#domexception - ?? - -attribute - Document.title - http://www.whatwg.org/specs/web-apps/current-work/#document - HTMLSelectElement.length - http://www.whatwg.org/specs/web-apps/current-work/#htmlselectelement - -read only attribute - Node.parentNode - http://dom.spec.whatwg.org/#node - HTMLFormElement.length - http://www.whatwg.org/specs/web-apps/current-work/#htmlformelement - -attribute that inherits its getter - ?? - -stringifier on DOMString attribute - URLUtils.href (HTMLAnchorElement) - http://url.spec.whatwg.org/#urlutils - ?? - -regular operation - HTMLElement.click - http://www.whatwg.org/specs/web-apps/current-work/#htmlelement - Node.appendChild - http://dom.spec.whatwg.org/#node - -static operation - URL.createObjectURL - File API - CSS.supports - ... - -variadic operation - DOMTokenList.add - ... - WindowTimers.setTimeout - ... - -optional argument - Window.postMessage - http://www.whatwg.org/specs/web-apps/current-work/#window - DOMImplementation.createHTMLDocument - http://dom.spec.whatwg.org/#domimplementation - -optional argument default value - Node.cloneNode - http://dom.spec.whatwg.org/#node - HTMLSelectElement.add - http://www.whatwg.org/specs/web-apps/current-work/#htmlselectelement - -indexed getter on operation - NodeList.item - http://dom.spec.whatwg.org/#nodelist - HTMLSelectElement.item - http://www.whatwg.org/specs/web-apps/current-work/#htmlselectelement - -indexed getter not on an operation - HTMLFormElement getter - http://www.whatwg.org/specs/web-apps/current-work/#htmlformelement - AudioTrackList getter - http://www.whatwg.org/specs/web-apps/current-work/#audiotracklist - -indexed setter on an operation - ?? - -indexed setter not on an operation - HTMLSelectElement setter - http://www.whatwg.org/specs/web-apps/current-work/#htmlselectelement - HTMLOptionsCollection setter - http://www.whatwg.org/specs/web-apps/current-work/#htmloptionscollection - -indexed creator on an operation - ?? - -indexed creator not an operation - HTMLSelectElement creator - http://www.whatwg.org/specs/web-apps/current-work/#htmlselectelement - HTMLOptionsCollection creator - http://www.whatwg.org/specs/web-apps/current-work/#htmloptionscollection - -indexed deleter on an operation - -- - -indexed deleter not on an operation - -- - -named getter on operation - Storage.getItem - http://www.whatwg.org/specs/web-apps/current-work/#storage-0 - HTMLCollection.namedItem - http://dom.spec.whatwg.org/#htmlcollection - -named getter not on an operation - DOMStringMap getter - http://www.whatwg.org/specs/web-apps/current-work/#domstringmap - HTMLFormElement getter - http://www.whatwg.org/specs/web-apps/current-work/#htmlformelement - -named setter on an operation - Storage.setItem - http://www.whatwg.org/specs/web-apps/current-work/#storage-0 - ?? - -named setter not on an operation - DOMStringMap setter - http://www.whatwg.org/specs/web-apps/current-work/#domstringmap - DOMElementMap setter - http://www.whatwg.org/specs/web-apps/current-work/#domelementmap (too new?) - -named creator on an operation - Storage.setItem - http://www.whatwg.org/specs/web-apps/current-work/#storage-0 - ?? - -named creator not an operation - DOMStringMap creator - http://www.whatwg.org/specs/web-apps/current-work/#domstringmap - DOMElementMap creator - http://www.whatwg.org/specs/web-apps/current-work/#domelementmap (too new?) - -named deleter on an operation - Storage.removeItem - http://www.whatwg.org/specs/web-apps/current-work/#storage-0 - ?? - -named deleter not on an operation - DOMStringMap deleter - http://www.whatwg.org/specs/web-apps/current-work/#domstringmap - DOMElementMap deleter - http://www.whatwg.org/specs/web-apps/current-work/#domelementmap (too new?) - -legacy caller on an operation - HTMLAllCollection.namedItem - http://www.whatwg.org/specs/web-apps/current-work/#htmlallcollection - HTMLFormControlsCollection.namedItem - http://www.whatwg.org/specs/web-apps/current-work/#htmlformcontrolscollection - -legacy caller not on an operation - HTMLObjectElement legacycaller - http://www.whatwg.org/specs/web-apps/current-work/#htmlobjectelement - ?? - -stringifier on an operation - ?? - -stringifier not on an operation - DOMTokenList stringifier - http://dom.spec.whatwg.org/#domtokenlist - ?? - -overloaded operations - CanvasRenderingContext2D.drawImage - http://www.whatwg.org/specs/web-apps/current-work/#canvasrenderingcontext2d - FormData.append - http://xhr.spec.whatwg.org/#formdata - -dictionary - EventInit - http://dom.spec.whatwg.org/#event - IDBObjectStoreParameters - https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#options-object-concept - -dictionary inheritance - MessageEventInit - http://www.whatwg.org/specs/web-apps/current-work/#messageeventinit - CustomEventInit - http://dom.spec.whatwg.org/#customevent - -dictionary member default value - IDBObjectStoreParameters - https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#options-object-concept - CustomEventInit - http://dom.spec.whatwg.org/#customevent - -partial dictionary - partial MouseEventInit - http://www.whatwg.org/specs/web-apps/current-work/ (too new?) - ?? - -exception - DOMException - http://dom.spec.whatwg.org/#exception-domexception - ?? - -exception field - DOMException.code - http://dom.spec.whatwg.org/#exception-domexception - ?? - -exception inheritance - ?? - -exception name - HierarchyRequestError - http://dom.spec.whatwg.org/#error-names-table - VersionError - https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#exceptions0 - -exception message - (hard to test?) - -enumeration - DocumentReadyState - http://www.whatwg.org/specs/web-apps/current-work/#documentreadystate - XMLHttpRequestResponseType - http://xhr.spec.whatwg.org/#xmlhttprequestresponsetype - -callback function - EventHandlerNonNull - http://www.whatwg.org/specs/web-apps/current-work/#eventhandlernonnull - PortCollectionCallback - http://www.whatwg.org/specs/web-apps/current-work/#portcollectioncallback - -typedef - not really necessary - -implements - Document implements GlobalEventHandlers - http://www.whatwg.org/specs/web-apps/current-work/#document - Document implements ParentNode - http://dom.spec.whatwg.org/#parentnode - -implements with an interface on the rhs that inherits from another interface - ?? - -interface extended attributes: - [ArrayClass] - NodeList - http://dom.spec.whatwg.org/#nodelist - ?? - - [Constructor] - Event - http://dom.spec.whatwg.org/#event - XMLHttpRequest - http://xhr.spec.whatwg.org/#xmlhttprequest - - [ImplicitThis] - ?? - - [NamedConstructor] - Image - http://www.whatwg.org/specs/web-apps/current-work/#htmlimageelement - Audio - http://www.whatwg.org/specs/web-apps/current-work/#htmlaudioelement - - [NamedPropertiesObject] - Window - http://www.whatwg.org/specs/web-apps/current-work/#window - - [NoInterfaceObject] - WindowTimers - http://www.whatwg.org/specs/web-apps/current-work/#windowtimers - NavigatorID - http://www.whatwg.org/specs/web-apps/current-work/#navigatorid - - [OverrideBuiltins] - HTMLFormElement - http://www.whatwg.org/specs/web-apps/current-work/#htmlformelement - ?? - -partial interface extended attributes: - [NamedPropertiesObject] - ?? - - [OverrideBuiltins] - partial interface Document - http://www.whatwg.org/specs/web-apps/current-work/#document - -constant extended attributes: none - -attribute extended attributes: - [Clamp] - ?? - - [EnforceRange] - ?? - - [LenientThis] - Document.onreadystatechange - http://www.whatwg.org/specs/web-apps/current-work/#document - GlobalEventHandlers.onmouseenter - http://www.whatwg.org/specs/web-apps/current-work/#globaleventhandlers - - [PutForwards] - Document.location - http://www.whatwg.org/specs/web-apps/current-work/#document - HTMLElement.style - http://www.whatwg.org/specs/web-apps/current-work/#htmlelement - - [Replaceable] - Window.self - http://www.whatwg.org/specs/web-apps/current-work/#window - Window.length - http://www.whatwg.org/specs/web-apps/current-work/#window - - [TreatNullAs] - HTMLFrameElement.marginHeight - http://www.whatwg.org/specs/web-apps/current-work/#dom-frame-marginheight - CharacterData.data - http://dom.spec.whatwg.org/#characterdata - - [TreatUndefinedAs] - ?? - - [Unforgeable] - Window.document - http://www.whatwg.org/specs/web-apps/current-work/#window - Event.isTrusted - http://dom.spec.whatwg.org/#event (too new?) - -operation extended attributes: - [TreatNullAs] - ?? - - [TreatUndefinedAs] - ?? - -operation argument extended attributes: - [Clamp] - WebSocket.close - http://www.whatwg.org/specs/web-apps/current-work/#websocket (hard to test?) - Uint8ClampedArray.set - http://www.khronos.org/registry/typedarray/specs/latest/#7.1 - - [EnforceRange] - (there are some uses in IndexedDB) - ?? - - [TreatNullAs] - DOMImplementation.createDocument - http://dom.spec.whatwg.org/#domimplementation - ?? - - [TreatUndefinedAs] - ?? - -dictionary extended attributes: none - -dictionary member extended attributes: - [Clamp] - ?? - - [EnforceRange] - ?? - -exception extended attributes: - [NoInterfaceObject] - ?? - -exception field extended attributes: none - -enumeration extended attributes: none - -callback function extended attributes: - [TreatNonCallableAsNull] - EventHandlerNonNull - http://www.whatwg.org/specs/web-apps/current-work/#eventhandlernonnull - OnErrorEventHandlerNonNull - http://www.whatwg.org/specs/web-apps/current-work/#onerroreventhandlernonnull - -typedef extended attributes: none -implements statement extended attributes: none - - - -Binding -------- - -4. ECMAScript binding - -* objects are [[Extensible]] = true by default (all objects actually) -* objects have [[Prototype]] = Object.prototype by default -* function objects have [[Class]] = "Function", [[Prototype]] = Function.prototype - - DONE - -4.1 ECMAScript environment - -* each environment has unique set of initial objects -* [[Prototype]]s are the same in a given environment -* Object.prototype.toString must be [[Writable]] = true, [[Enumerable]] = false, [[Configurable]] = true, - and stringifies objects to "[object ]". - - DONE - -4.2 ECMAScript type mapping - -* any - CustomEvent.initCustomEvent - http://dom.spec.whatwg.org/#interface-customevent - CustomEvent.detail - http://dom.spec.whatwg.org/#interface-customevent - -* void - * operations returning void return undefined - -* boolean - Event.initEvent - http://dom.spec.whatwg.org/#event - Event.bubbles - http://dom.spec.whatwg.org/#event - Document.hasFocus - http://www.whatwg.org/specs/web-apps/current-work/#document - -* byte - Int8Array indexed property getter and setter - http://www.khronos.org/registry/typedarray/specs/latest/#7 - ?? - -* octet - Uint8Array indexed property getter and setter - http://www.khronos.org/registry/typedarray/specs/latest/#7 - ?? - -* short - Int16Array indexed property getter and setter - http://www.khronos.org/registry/typedarray/specs/latest/#7 - ?? - -* unsigned short - CloseEvent constructor, code - http://www.whatwg.org/specs/web-apps/current-work/#event-definitions-3 - Range.compareBoundaryPoints - http://dom.spec.whatwg.org/#range - WebSocket.readyState - http://www.whatwg.org/specs/web-apps/current-work/#websocket - -* long - HTMLPreElement.width - http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis - HTMLElement.tabIndex - http://www.whatwg.org/specs/web-apps/current-work/#htmlelement - -* unsigned long - Document.createNodeIterator - http://dom.spec.whatwg.org/#document - WheelEvent constructor and .deltaMode - http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent - HTMLCollection.length - ... - -* long long - ?? - -* unsigned long long - (IDBVersionChangeEvent has an unsigned long long member, but the constructor for this event doesn't seem to be implemented anywhere yet) - ?? - -* float - SVGNumber.value - https://svgwg.org/svg2-draft/types.html#InterfaceSVGNumber - SVGMatrix.{translate,e} - https://svgwg.org/svg2-draft/coords.html#InterfaceSVGMatrix - -* unrestricted float - Float32Array indexed property getter and setter - http://www.khronos.org/registry/typedarray/specs/latest/#7 - ?? - -* double - HTMLProgressElement.value - http://www.whatwg.org/specs/web-apps/current-work/#htmlprogresselement - HTMLMeterElement.min - http://www.whatwg.org/specs/web-apps/current-work/#htmlmeterelement - -* unrestricted double - HTMLInputElement.valueAsNumber - http://www.whatwg.org/specs/web-apps/current-work/#htmlelement - Float64Array indexed property getter and setter - http://www.khronos.org/registry/typedarray/specs/latest/#7 - -* DOMString - Attr.value - http://dom.spec.whatwg.org/#interface-attr - CharacterData.appendData - http://dom.spec.whatwg.org/#characterdata - Node.nodeName - http://dom.spec.whatwg.org/#interface-node - -* object - TrackEvent.track - http://www.whatwg.org/specs/web-apps/current-work/#event-definitions - ?? - -* interface type - Node.appendChild - http://dom.spec.whatwg.org/#node - SVGPoint.matrixTransform - https://svgwg.org/svg2-draft/coords.html#InterfaceSVGPoint - EventTarget.addEventListener - http://dom.spec.whatwg.org/#eventtarget - Node.parentNode - ... - SVGSVGElement.createSVGPoint - ... - - is there a multiple operation callback interface we can use? - -* dictionary type - CustomEvent constructor - ... - WebGLRenderingContext.getContextAttributes() - http://www.khronos.org/registry/webgl/specs/latest/#5.2 - (would be good to test partial dictionaries, but the only one I'm aware of is MouseEvent in HTML, but that's not implemented) - -* enumeration type - CanvasFillRule - http://www.whatwg.org/specs/web-apps/current-work/#canvasfillrule - (is there a writable attribute of an enum type to test?) - (and one to test returning enum alues) - -* callback function type - MutationObserver constructor - http://dom.spec.whatwg.org/#mutationobserver - GlobalEventHandlers.onclick - http://www.whatwg.org/specs/web-apps/current-work/#idl-definitions - -* nullable - Node.textContent - http://dom.spec.whatwg.org/#node - Node.insertBefore - http://dom.spec.whatwg.org/#node - Document.getElementById - ... - -* sequence - MutationObserverInit - http://dom.spec.whatwg.org/#mutationobserver (would be nice to have platform array object to pass in) - MutationCallback - ... - ?? - -* array - ?? - -* union - HTMLSelectElement.add - http://www.whatwg.org/specs/web-apps/current-work/#htmlselectelement - ?? - -* Date - HTMLInputElement.valueAsDate - http://www.whatwg.org/specs/web-apps/current-work/#htmlinputelement - ?? - - DONE - -4.2.24.1 Platform array object [[GetOwnProperty]] method - -* "length" -* valid array index -* invalid array index -* other properties - - ?? - -4.2.24.2 Platform array object [[DefineOwnProperty]] method - -* "length" -* valid array index -* invalid array index -* other properties - - ?? - -4.2.24.3 Platform array object [[Delete]] method - -... - ?? - -4.3 [ArrayClass] -4.3.2 [Clamp] -4.3.3 [Constructor] -4.3.4 [EnforceRange] -4.3.5 [ImplicitThis] -4.3.6 [LenientThis] -4.3.7 [NamedConstructor] -4.3.8 [NoInterfaceObject] -4.3.9 [OverrideBuiltins] -4.3.10 [PutForwards] -4.3.11 [Replaceable] -4.3.12 [NamedPropertiesObject] -4.3.13 [TreatNonCallableAsNull] -4.3.14 [TreatNullAs=EmptyString] -4.3.15 [TreatUndefinedAs={EmptyString,Null}] -4.3.16 [Unforgeable] - -4.4 Interfaces - -* interface object property exists for callback interfaces with constants and non-callback interfaces that aren't [NoInterfaceObject] -* is [[Writable]] = true, [[Enumerable]] = false, [[Configurable]] = true -* if [NamedConstructor], there is another property with the same attributes - -4.4.1 Interface object - -* is a function object -* .prototype is the interface prototype object -* interface object for a callback interface is not a function object, does not have .prototype. its [[Prototype]] is Object.prototype - -4.4.1.1 [[Call]] - -* overload resolution algorithm -* interface object [[Call]] -* must return an object that implements the interface (and is associated with the same environment), or throw -* if [Constructor], .length is [[Writable]] = false, [[Enumerable]] = false, [[Configurable]] = false, Number. -* .length is 0 if not [Constructor] ** how can this be? - - simple constructors (with no overloading or optional arguments) - ArrayBuffer - ... - Range - ... - - simple constructors (no overloading but with optional arguments) - Event - ... - WebSocket - ... - - overloaded constructors - Uint8Array - Blob - File API - -4.4.1.2 Interface object [[HasInstance]] method - - TBD - -4.4.2 Named constructors - -* same .length as for [[Call]] -* also has .prototype [[Writable]] = false, [[Enumerable]] = false, [[Configurable]] = false, pointing to the interface prototype object - -4.4.3 Interface prototype object - -* if not [NoInterfaceObject], has .constructor [[Writable]] = true, [[Enumerable]] = false, [[Configurable]] = true, pointing to interface object -* [[Prototype]] can point to named properties object, if [NamedPropertiesObject], or the interface prototype object of the inherited interface, or Array.prototype if [ArrayClass], or Object.prototype -* class string "BlahPrototype" - -4.4.4 Named properties object - -* function object -* [[Prototype]] points to interface prototype object of inherited interface, or Array.prototype if [ArrayClass], or Object.prototype -* class string "BlahProperties" - -4.4.4.1 Named properties object [[GetOwnProperty]] method - -* returns [[Writable]] = false, [[Enumerable]] = true, [[Configurable]] = true for named properties - -4.4.5 Constants - -* property exists on interface object and interface prototype object -* [[Writable]] = false, [[Enumerable]] = true, [[Configurable]] = false - -4.4.6 Attributes - -* if [Unforgeable], on an instance. otherwise, on interface prototype object. -* accessor, [[Enumerable]] = true, [[Configurable]] = !!unforgeable -* attribute getter is function object; [LenientThis] => return undefined on wrong object -* attribute getter .length = 0 -* attribute setter is udnefined if readonly and not [PutForwards] and not [Replaceable]. -* setter throws if no arguments passed; > 1 arguments ignored -* if invalid this object and not [LenientThis], throw TypeError -* if [Replaceable], invokes [[DefineOwnProperty]] to replace it, [[Writable]] = true, [[Enumerable]] = true, [[Configurable]] = true -* if invalid this object and [LenientThis], returns -* if [PutForwards], ... -* assigning invalid enumeration types is ignored -* .length = 1 - - nothing for assigning to an enum - -4.4.7 Operations - -* property exists on the interface prototype object (if regular) or interface object (if static) -* [[Writable]] = true, [[Enumerable]] = true, [[Configurable]] = true -* value is a function object -* [ImplicitThis] can turn null/undefined this value into the global -* throw TypeError if wrong this object -* .length is shortest valid argument count -* stringifiers => .toString, [[Writable]] = true, [[Enumerable]] = true, [[Configurable]] = true, function object -* stringifier on attribute calls [[Get]] with the attribute's property name -* stringifier on an operation gets the function with [[Get]] and calls it - - nothing to test for a distinguishing argument index > 0 - nothing to test for "stringifier" on an operation - -4.5 Implements statement - - URLUtils.href - afaict there isn't a use of implements with more than one consequential interface - -4.6 Platform objects implementing interfaces - -* primary interface determines class string -* global environment can be changed - -4.6.1 Indexed and named properties - -* when [NamedPropertiesObject], named properties are exposed on that object and not on the instance -* Object.{freeze,seal,preventExtensions} throw TypeError on objects supporting indexed or named properties -* named property visibility algorithm, looks at [Unforgeable], supported property name, [OverrideBuiltins], ... - -4.6.2 Platform object [[GetOwnProperty]] method -4.6.3 Platform object [[DefineOwnProperty]] method -4.6.4 Platform object [[Delete]] method - -* ... indexed, named properties ... - - can't test an object with a named property setter but no creator - can't test indexed property deleter - -4.6.5 Platform object [[Call]] method - -* legacy caller - -4.6.6 Property enumeration - -* indexed properties first, numerical order -* then named properties, spec defined order -* remaining properties, no defined order - -4.7 User object implementing callback interfaces - -* single operation interface, any object apart from native Date and native RegExp can implement it -* if the object is callable, its [[Call]] is the implementation -* if the object is not callable, get the function with [[Get]] -* multiple operation interface, any object not a platform object and not a native Date or RegExp implements it -* how to invoke callback interface operation -* callback this value, null by default -* how to get/set callback interface attribute - -4.8 Invoking callback functions - -4.9 Exceptions - -* if not [NoInterfaceObject], property exists on global -* [[Writable]] = true, [[Enumerable]] = true, [[Configurable]] = true - -4.9.1 Exception interface object - -* function object -* .prototype is [[Writable]] = false, [[Enumerable]] = false, [[Configurable]] = false - -4.9.1.1 Exception interface object [[Call]] method - -* construct an object with [[Prototype]] set to the exception interface object, class string = the exception identifier -* if arg_0 is not undefined, sets .message to it with [[Writable]] = true, [[Enumerable]] = false, [[Configurable]] = true; - this shadows .message from Error.prototype - -4.9.2 Exception interface prototype object - -* [[Prototype]] is the inherited exception interface prototype object, or Error.prototype -* class string is "BlahPrototype" -* .name with [[Writable]] = true, [[Enumerable]] = false, [[Configurable]] = true -* if not [NoInterfaceObject], .constructor is [[Writable]] = true, [[Enumerable]] = false, [[Configurable]] = true; points to exception interface object - -4.9.3 Constants - -* property on exception interface prototype object and exception interface object -* [[Writable]] = false, [[Enumerable] = true, [[Configurable]] = false - -4.9.4 Exception fields - -* on exception interface prototype object -* [[Get]], [[Enumerable]] = true, [[Configurable]] = true -* exception field getter is a function object -* throws a TypeError with bad this -* .length is 0 - -4.10 Exception objects - -* if created through new, associated with that exception interface object's global environment -* [[Prototype]] is the exception interface prototype object -* [[Class]] is "Error" -* class string is the identifier of the exception - -4.11 Throwing exeptions - -* defines "current global environment", which is topmost Function for an attribute, operation, indexed property, named property, constructor, named constructor, stringifier, excpetion constructor or exception field getter. -* throwing an exception with optional name N, optional message M, follows some steps - -4.12 Handling exceptions - -* nothing - -5.1 DOMTimeStamp - -5.2 Function - -5.3 VoidFunction - - - -Objects -------- - -interface object -interface object for an inherited interface -interface prototype object -interface prototype object for an inherited interface -named constructor object -attribute getter -attribute setter -operation Function -static operation Function -stringifier Function -exception interface object -exception interface prototype object -exception field getter -platform object implementing an interface -platform object implementing an inherited interface -platform object representing an exception -platform array object -named properties object +Some notes on missing Web IDL test coverage +------------------------------------------- + +Web IDL features that are tested by only a single API feature: + + * constants on an exception; DOMException.INVALID_STATE_ERR is tested + * stringifier on an attribute; URLUtils.href is tested + * [ArrayClass]; NodeList is tested + * JS <-> IDL conversion of byte; Int8Array indexed properties are tested + * JS <-> IDL conversion of octet; Uint8Array indexed properties are tested + * JS <-> IDL conversion of short; Int16Array indexed properties are tested + * JS <-> IDL conversion of unrestricted float; Float32Array indexed properties are tested + * JS <-> IDL conversion of object; TrackEvent.track is tested + * JS <-> IDL conversion of union type; HTMLSelectElement.add is tested + * JS <-> IDL conversion of Date; HTMLInputElement.valueAsDate is tested, and File.lastModifiedDate is hard to test + +Web IDL features that are used but not yet implemented: + + * partial dictionary; there is a partial MouseEventInit in HTML + * unsigned long long without [EnforceRange]; there is IDBVersionChangeEvent.oldVersion in IndexedDB + * platform array objects + * array types not as an argument type (JS <-> IDL conversion); there are a few uses in HTML + +Web IDL features that are used but are hard to test: + + * long long; there are some uses in WebGL + * unsigned long long + +Web IDL features that are not used in specific interesting ways: + + * implements statement, with more than one consequential interface + * operation overloading with distinguishing index > 0 + * callback interface with multiple operations + * callback interface with attribute + * exception inheritance + * [Clamp] on an attribute + * [EnforceRange] on an attribute + * [NoInterfaceObject] on an exception + * writable attribute with an enum type (JS -> IDL conversion) + * enum type as an operation return type or attribute type (IDL -> JS conversion) + * stringifier on an operation + * interface with a named property setter but not a named property creator + +Web IDL features that are not used at all: + + * indexed property deleter + * [ImplicitThis] From b6a7a5d7f88730f270e49a7185b8a5cf57c45bbf Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 13 May 2013 14:14:40 +1000 Subject: [PATCH 098/116] Record features ordered by type. --- .../submissions/heycam/features-by-type.txt | 151 ++++++++++++++++++ .../submissions/heycam/gather-features.pl | 34 +++- 2 files changed, 181 insertions(+), 4 deletions(-) create mode 100644 WebIDL/tests/submissions/heycam/features-by-type.txt diff --git a/WebIDL/tests/submissions/heycam/features-by-type.txt b/WebIDL/tests/submissions/heycam/features-by-type.txt new file mode 100644 index 00000000000000..c99061d9c46dff --- /dev/null +++ b/WebIDL/tests/submissions/heycam/features-by-type.txt @@ -0,0 +1,151 @@ +# This file is generated by gather-features.pl. + +attribute + Attr.value (of type DOMString - DOMString-003.html) (writable, of type DOMString - DOMString-001.html) + CharacterData.appendData (writable, of type DOMString - DOMString-002.html) + CharacterData.data (with [TreatNullAs=EmptyString] - TreatNullAs-001.html) + CloseEvent.code (of type unsigned short - unsigned-short-003.html) + Document.location (with [PutForwards] - PutForwards-001.html) + Document.onclick (with [TreatNonCallableAsNull] - TreatNonCallableAsNull-001.html) + Document.onerror (with [TreatNonCallableAsNull] - TreatNonCallableAsNull-001.html) + Document.onreadystatechange (with [LenientThis] - LenientThis-001.html) + Document.title (writable - class-string-001.html, class-string-001.html, extensible-001.html, extensible-001.html, functions-001.html, functions-001.html, initial-001.html, initial-001.html, initial-002.html, initial-002.html) (writable, without [Unforgeable] - attribute-001.html, attribute-005.html) + Element.className (without [TreatNullAs] - TreatNullAs-001.html) + Event.bubbles (of type boolean - boolean-002.html) + Event.isTrusted (with [Unforgeable] - Unforgeable-001.html) + GlobalEventHandlers.onclick (of a callback function type - callback-function-type-003.html) (writable, of a callback function type - callback-function-type-002.html) + GlobalEventHandlers.onmouseenter (with [LenientThis] - LenientThis-001.html) + HTMLCollection.length (of type unsigned long - unsigned-long-003.html) + HTMLElement.style (with [PutForwards] - PutForwards-001.html) + HTMLElement.tabIndex (of type long - long-003.html) (writable, of type long - long-002.html) + HTMLFormElement (read only, without [Unforgeable] - attribute-004.html) + HTMLFormElement.length (read only - class-string-001.html, extensible-001.html, functions-001.html, initial-001.html, initial-002.html) + HTMLFrameElement.marginWidth (with [TreatNullAs=EmptyString] - TreatNullAs-001.html) + HTMLInputElement.number (of type unrestricted double - unrestricted-double-004.html) + HTMLInputElement.valueAsDate (of type Date - Date-001.html, Date-002.html) + HTMLInputElement.valueAsNumber (writable, of type unrestricted double - unrestricted-double-001.html) + HTMLMeterElement.min (writable, of type double - double-002.html) + HTMLPreElement.width (of type long - long-003.html) (writable, of type long - long-001.html) + HTMLProgressElement.value (of type double - double-003.html) (writable, of type double - double-001.html) + HTMLSelectElement.length (throwing-001.html) (writable - class-string-001.html, class-string-001.html, extensible-001.html, extensible-001.html, functions-001.html, functions-001.html, initial-001.html, initial-001.html, initial-002.html, initial-002.html) (writable, without [Unforgeable] - attribute-002.html, attribute-006.html) + Node.insertBefore (writable, of a nullable interface type - nullable-002.html) + Node.nodeName (of type DOMString - DOMString-003.html) + Node.parentNode (of an interface type - interface-type-004.html) (read only - class-string-001.html, extensible-001.html, functions-001.html, initial-001.html, initial-002.html) (read only, without [Unforgeable] - attribute-003.html) + Node.textContext (writable, of type DOMString? - nullable-001.html) + SVGMatrix.a (of type float - float-003.html) + SVGNumber.value (of type float - float-003.html) (writable, of type float - float-001.html) + TrackEvent.track (of type object? - object-002.html) + WebSocket.readyState (of type unsigned short - unsigned-short-003.html) + WheelEvent.deltaMode (of type unsigned long - unsigned-long-003.html) + Window.document (with [Unforgeable] - Unforgeable-001.html) + Window.length (with [Replaceable] - Replaceable-001.html) + Window.self (with [Replaceable] - Replaceable-001.html) +callback interface + NodeFilter (with constants - interface-001.html, interface-object-002.html) +constant + DOMException.INVALID_STATE_ERR (on an exception - constant-003.html) + HTMLMediaElement.NETWORK_IDLE (constant-001.html) + NodeFilter.SHOW_ALL (on a callback interface - constant-002.html) + SVGLength.SVG_LENGTHTYPE_NUMBER (constant-001.html) +dictionary member + MutationObserverInit.attributeFilter (of a sequence type - sequence-001.html) + TrackEventInit.track (of type object? - object-001.html) +exception + DOMException (class-string-001.html, class-string-001.html, exception-interface-object-001.html, exception-interface-object-002.html, exception-interface-prototype-object-001.html, exception-object-001.html, extensible-001.html, extensible-001.html, initial-001.html, initial-002.html) (without [NoInterfaceObject] - class-string-001.html, exception-001.html, extensible-001.html, functions-001.html, initial-001.html, initial-002.html) +exception field + DOMException.code (class-string-001.html, exception-field-001.html, extensible-001.html, functions-001.html, initial-001.html, initial-002.html) +indexed property creator + HTMLOptionsCollection (indexed-properties-005.html) + HTMLSelectElement (indexed-properties-005.html) +indexed property getter + Float32Array (of type unrestricted float - unrestricted-float-002.html) + Float64Array (of type unrestricted double - unrestricted-double-004.html) + HTMLSelectElement (has an indexed property setter - indexed-properties-002.html) + Int16Array (of type short - short-002.html) + Int8Array (of type byte - byte-002.html) + NodeList (does not have an indexed property setter - indexed-properties-002.html) + Uint8Array (of type octet - octet-002.html) +indexed property setter + Float32Array (of type unrestricted float - unrestricted-float-001.html) + Float64Array (of type unrestricted double - unrestricted-double-002.html, unrestricted-double-003.html) + Int16Array (of type short - short-001.html) + Int8Array (of type byte - byte-001.html) + Uint8Array (throwing-001.html) (of type octet - octet-001.html) + Uint8ClampedArray (with [Clamp] - Clamp-001.html) +interface + ArrayBuffer (with [Constructor], and no overloading or optional arguments - Constructor-002.html) + CloseEvent (with constructor with argument of type unsigned short - unsigned-short-001.html) + CustomEvent (with constructor with argument of a dictionary type - dictionary-type-001.html) + DOMImplementation (instanceof-001.html, interface-object-001.html) (without inheritance - class-string-001.html, extensible-001.html, initial-001.html, initial-002.html) (without inheritance, primary interface - class-string-001.html, extensible-001.html) (without inheritance, without [NoInterfaceObject] - class-string-001.html, extensible-001.html, functions-001.html, initial-001.html, initial-002.html, interface-001.html, interface-prototype-object-001.html) + DOMStringMap (does not support indexed properties, supports named properties - property-enumeration-001.html) (supports named properties - named-properties-001.html) + DOMTokenList (supports indexed properties, does not have an indexed property setter - indexed-properties-003.html) + Element (instanceof-001.html) (with inheritance - class-string-001.html, extensible-001.html, initial-001.html, initial-002.html) (with inheritance, without [NoInterfaceObject] - class-string-001.html, extensible-001.html, functions-001.html, initial-001.html, initial-002.html, interface-001.html, interface-prototype-object-001.html) (without [Constructor] - Constructor-001.html) + Event (with [Constructor] - Constructor-001.html, throwing-001.html) (with [Constructor] and optional arguments - Constructor-003.html) (with inheritance, with [Constructor] - functions-001.html) + HTMLAudioElement (with [NamedConstructor] - class-string-001.html, extensible-001.html, functions-001.html, initial-001.html, initial-002.html, NamedConstructor-001.html) + HTMLCollection (interface-object-001.html) (supports indexed properties, supports named properties - property-enumeration-001.html) (supports named properties, does not have a named property setter, does not have a named property creator - named-properties-003.html) (withogut inheritance, without [NoInterfaceObject] - functions-001.html) (without inheritance - class-string-001.html, extensible-001.html, initial-001.html, initial-002.html) (without inheritance, primary interface - class-string-001.html, extensible-001.html) (without inheritance, without [NoInterfaceObject] - class-string-001.html, extensible-001.html, initial-001.html, initial-002.html, interface-001.html, interface-prototype-object-001.html) + HTMLDivElement (with inheritance, primary interface - class-string-001.html, extensible-001.html) + HTMLFormElement (with [OverrideBuiltins] - OverrideBuiltins-001.html) + HTMLImageElement (with [NamedConstructor] - class-string-001.html, extensible-001.html, functions-001.html, initial-001.html, initial-002.html, NamedConstructor-001.html, throwing-001.html) + HTMLObjectElement (with a legacy caller - legacy-caller-001.html) + MutationObserver (with [Constructor] with argument of a callback function type - callback-function-type-001.html) + NavigatorID (with [NoInterfaceObject] - NoInterfaceObject-001.html) + NodeList (supports indexed properties - indexed-properties-001.html) (supports indexed properties, does not have an indexed property setter, does not have an indexed property creator - indexed-properties-003.html) (with [ArrayClass] - ArrayClass-001.html) + Range (with [Constructor], and no overloading or optional arguments - Constructor-002.html) + Storage (supports named properties - named-properties-001.html) + UIEvent (with inheritance - class-string-001.html, extensible-001.html, initial-001.html, initial-002.html) (with inheritance, primary interface - class-string-001.html, extensible-001.html) (with inheritance, without [NoInterfaceObject] - class-string-001.html, extensible-001.html, functions-001.html, initial-001.html, initial-002.html, interface-001.html, interface-prototype-object-001.html) + URLUtils (used on RHS of implements statement - implements-001.html) + Uint8Array (supports indexed properties - indexed-properties-001.html) (supports indexed properties, does not support named properties - property-enumeration-001.html) (supports indexed properties, has an indexed property setter, does not have an indexed property creator - indexed-properties-004.html) + WebSocket (with [Constructor] and optional arguments - Constructor-003.html) + WheelEvent (with constructor with argument of type unsigned long - unsigned-long-002.html) + Window (with [NamedPropertiesObject] - class-string-001.html, extensible-001.html, initial-001.html, initial-002.html, NamedPropertiesObject-001.html, NamedPropertiesObject-002.html, NamedPropertiesObject-003.html, NamedPropertiesObject-004.html) + WindowTimers (with [NoInterfaceObject] - NoInterfaceObject-001.html) + XMLHttpRequest (with [Constructor] - Constructor-001.html) (with inheritance, with [Constructor] - functions-001.html) +named property creator + DOMStringMap (named-properties-004.html) + Storage (named-properties-004.html) +named property deleter + DOMStringMap (named-properties-005.html) + Storage (named-properties-005.html) +named property getter + DOMStringMap (has a named property setter - named-properties-002.html) + HTMLCollection (does not have a named property setter, supports indexed properties - named-properties-002.html) +operation + CanvasRenderingContext2D.createImageData (overloaded - operation-004.html) + CanvasRenderingContext2D.drawImage (overloaded - operation-001.html, operation-004.html) + CustomEvent.initCustomEvent (with argument of type any - any-001.html) + DOMImplementation.createDocument (with [TreatNullAs=EmptyString] on an argument - TreatNullAs-002.html) + DOMImplementation.createHTMLDocument (with optional argument - operation-001.html, operation-002.html) + DOMTokenList.add (variadic - operation-001.html, operation-003.html) + Document.createNodeIterator (with argument of type unsigned long - unsigned-long-001.html) + Document.getElementById (with a nullable return type - nullable-003.html) + Document.hasFocus (with return type boolean - boolean-002.html) + Event.initEvent (with argument of type boolean - boolean-001.html) + EventTarget.addEventListener (with argument of a single operation callback interface type - interface-type-003.html) + FormData.append (overloaded - operation-001.html) + HTMLElement.click (class-string-001.html, extensible-001.html, functions-001.html, initial-001.html, initial-002.html, operation-001.html) (with return type void - void-001.html) + HTMLSelectElement.add (with argument of a union type - union-001.html) (with optional argument default value - operation-001.html) + HTMSelectLElement.add (with return type void - void-001.html) + IDBFactory.open (with [EnforceRange] on an argument - EnforceRange-001.html) + MutationCallback (on a callback interface, of a sequence type - sequence-002.html) + Node.appendChild (class-string-001.html, extensible-001.html, functions-001.html, initial-001.html, initial-002.html, operation-001.html, throwing-001.html) (with argument of an interface type - interface-type-001.html) + Node.cloneNode (with optional argument default value - operation-001.html) + Range.compareBoundaryPoints (with argument of type unsigned short - unsigned-short-002.html) + SVGMatrix.translate (with argument of type float - float-002.html) + SVGPoint.matrixTransform (with argument of an interface type - interface-type-002.html) + SVGSVGElement.createSVGPoint (with interface type return type - interface-type-004.html) + WebGLRenderingContext.getContextAttributes (with dictionary type return type - dictionary-type-002.html) + WebSocket.close (with [Clamp] on an argument - Clamp-001.html) + Window.postMessage (with optional argument - operation-001.html, operation-002.html) + Window.setTimeout (variadic - operation-001.html) + WindowTimers.setTimeout (variadic - operation-003.html) +operation, with argument of an enum type + CanvasRenderingContext2D.fill (enum-type-001.html) +partial interface + Document (with [OverrideBuiltins] - OverrideBuiltins-002.html) +static operation + CSS.supports (functions-001.html, initial-001.html, initial-002.html) + URL.createObjectURL (functions-001.html, initial-001.html, initial-002.html) +stringifier + DOMTokenList (class-string-001.html, extensible-001.html, functions-001.html, initial-001.html, initial-002.html, stringifier-001.html) + Location (throwing-001.html) + URLUtils (functions-001.html, initial-001.html, initial-002.html, stringifier-001.html, stringifier-002.html) diff --git a/WebIDL/tests/submissions/heycam/gather-features.pl b/WebIDL/tests/submissions/heycam/gather-features.pl index 220b9f159fd608..491b33a55b5bd8 100755 --- a/WebIDL/tests/submissions/heycam/gather-features.pl +++ b/WebIDL/tests/submissions/heycam/gather-features.pl @@ -3,6 +3,7 @@ use strict; my %features = (); +my %featuresByType = (); sub read_features { my $fh; @@ -11,12 +12,20 @@ sub read_features { while (<$fh>) { next unless s/^\s*\/\/ feature: //; /^([^(]*) \(([^)]*)\)(?: \(([^)]*)\))?$/ or die; - my $key = "$1 ($2)"; + my $name = $1; + my $type = $2; my $conditions = $3; $conditions = '' unless defined $conditions; + + my $key = "$name ($type)"; $features{$key} = { } unless defined $features{$key}; $features{$key}{$conditions} = [] unless defined $features{$key}{$conditions}; push @{$features{$key}{$conditions}}, $fn; + + $featuresByType{$type} = { } unless defined $featuresByType{$type}; + $featuresByType{$type}{$name} = { } unless defined $featuresByType{$type}{$name}; + $featuresByType{$type}{$name}{$conditions} = [] unless defined $featuresByType{$type}{$name}{$conditions}; + push @{$featuresByType{$type}{$name}{$conditions}}, $fn; } close $fh; } @@ -39,14 +48,31 @@ sub print_features { print $fh "# This file is generated by gather-features.pl.\n\n"; for my $key (sort keys %features) { print $fh "$key\n"; - for my $condition (sort keys %{$features{$key}}) { - print $fh " $condition\n" unless $condition eq ''; - for my $test (@{$features{$key}{$condition}}) { + for my $conditions (sort keys %{$features{$key}}) { + print $fh " $conditions\n" unless $conditions eq ''; + for my $test (@{$features{$key}{$conditions}}) { print $fh " $test\n"; } } } close $fh; + + open $fh, '>features-by-type.txt'; + print $fh "# This file is generated by gather-features.pl.\n\n"; + for my $type (sort keys %featuresByType) { + print $fh "$type\n"; + for my $name (sort keys %{$featuresByType{$type}}) { + print $fh " $name"; + for my $conditions (sort keys %{$featuresByType{$type}{$name}}) { + print $fh " ("; + print $fh "$conditions - " unless $conditions eq ''; + print $fh join ', ', @{$featuresByType{$type}{$name}{$conditions}}; + print $fh ")"; + } + print $fh "\n"; + } + } + close $fh; } read_tests(); From f61b625e6779d3b91ea7307781e98290fe0adcd9 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 13 May 2013 14:33:21 +1000 Subject: [PATCH 099/116] Fix feature annotation. --- WebIDL/tests/submissions/heycam/features-by-type.txt | 2 +- WebIDL/tests/submissions/heycam/features.txt | 4 ++-- WebIDL/tests/submissions/heycam/nullable-002.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/features-by-type.txt b/WebIDL/tests/submissions/heycam/features-by-type.txt index c99061d9c46dff..81ba8903a3db4f 100644 --- a/WebIDL/tests/submissions/heycam/features-by-type.txt +++ b/WebIDL/tests/submissions/heycam/features-by-type.txt @@ -28,7 +28,6 @@ attribute HTMLPreElement.width (of type long - long-003.html) (writable, of type long - long-001.html) HTMLProgressElement.value (of type double - double-003.html) (writable, of type double - double-001.html) HTMLSelectElement.length (throwing-001.html) (writable - class-string-001.html, class-string-001.html, extensible-001.html, extensible-001.html, functions-001.html, functions-001.html, initial-001.html, initial-001.html, initial-002.html, initial-002.html) (writable, without [Unforgeable] - attribute-002.html, attribute-006.html) - Node.insertBefore (writable, of a nullable interface type - nullable-002.html) Node.nodeName (of type DOMString - DOMString-003.html) Node.parentNode (of an interface type - interface-type-004.html) (read only - class-string-001.html, extensible-001.html, functions-001.html, initial-001.html, initial-002.html) (read only, without [Unforgeable] - attribute-003.html) Node.textContext (writable, of type DOMString? - nullable-001.html) @@ -129,6 +128,7 @@ operation MutationCallback (on a callback interface, of a sequence type - sequence-002.html) Node.appendChild (class-string-001.html, extensible-001.html, functions-001.html, initial-001.html, initial-002.html, operation-001.html, throwing-001.html) (with argument of an interface type - interface-type-001.html) Node.cloneNode (with optional argument default value - operation-001.html) + Node.insertBefore (with an argument of a nullable interface type - nullable-002.html) Range.compareBoundaryPoints (with argument of type unsigned short - unsigned-short-002.html) SVGMatrix.translate (with argument of type float - float-002.html) SVGPoint.matrixTransform (with argument of an interface type - interface-type-002.html) diff --git a/WebIDL/tests/submissions/heycam/features.txt b/WebIDL/tests/submissions/heycam/features.txt index 993b7e645a5fdb..54801784a0525c 100644 --- a/WebIDL/tests/submissions/heycam/features.txt +++ b/WebIDL/tests/submissions/heycam/features.txt @@ -406,8 +406,8 @@ Node.appendChild (operation) Node.cloneNode (operation) with optional argument default value operation-001.html -Node.insertBefore (attribute) - writable, of a nullable interface type +Node.insertBefore (operation) + with an argument of a nullable interface type nullable-002.html Node.nodeName (attribute) of type DOMString diff --git a/WebIDL/tests/submissions/heycam/nullable-002.html b/WebIDL/tests/submissions/heycam/nullable-002.html index ad2eaf2b6bbe3e..97efcf6279cd8f 100644 --- a/WebIDL/tests/submissions/heycam/nullable-002.html +++ b/WebIDL/tests/submissions/heycam/nullable-002.html @@ -11,7 +11,7 @@ // Except in the face of [TreatUndefinedAs] and [TreatNonCallableAs], JS // undefined and null values get converted to IDL null. -// feature: Node.insertBefore (attribute) (writable, of a nullable interface type) +// feature: Node.insertBefore (operation) (with an argument of a nullable interface type) function makeDiv() { var div = document.createElement("div"); From 6f14cb7613cc94d95fe3ed6eb3c271fc00e51659 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 13 May 2013 14:55:05 +1000 Subject: [PATCH 100/116] Fix title. --- .../submissions/heycam/interface-prototype-object-001.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebIDL/tests/submissions/heycam/interface-prototype-object-001.html b/WebIDL/tests/submissions/heycam/interface-prototype-object-001.html index 82f50ad8154ae9..81f3c674a3fdcc 100644 --- a/WebIDL/tests/submissions/heycam/interface-prototype-object-001.html +++ b/WebIDL/tests/submissions/heycam/interface-prototype-object-001.html @@ -1,5 +1,5 @@ -Exception interface object [[Call]] method +Interface prototype objects From acfeea40ce903d77fb7ddd0827d415fc3012509e Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Tue, 11 Jun 2013 10:15:48 +1000 Subject: [PATCH 101/116] Fix typo in test. --- WebIDL/tests/submissions/heycam/Constructor-004.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebIDL/tests/submissions/heycam/Constructor-004.html b/WebIDL/tests/submissions/heycam/Constructor-004.html index 6c1370bfaedcc8..a147821c89b9c2 100644 --- a/WebIDL/tests/submissions/heycam/Constructor-004.html +++ b/WebIDL/tests/submissions/heycam/Constructor-004.html @@ -36,7 +36,7 @@ test(function() { var a1 = new Uint8Array(4); - var a2 = new Uint8Array(a2); + var a2 = new Uint8Array(a1); assert_equals(a2.length, 4); }, "passing a Uint8Array as the only argument to the Uint8Array constructor selects the (Uint8Array) overload"); From 072a8890ae4527f252d2cfb8d2b356df556a278c Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Tue, 11 Jun 2013 10:40:37 +1000 Subject: [PATCH 102/116] Fix a bug. --- WebIDL/tests/submissions/heycam/Constructor-004.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/Constructor-004.html b/WebIDL/tests/submissions/heycam/Constructor-004.html index a147821c89b9c2..e9b97e5a458d32 100644 --- a/WebIDL/tests/submissions/heycam/Constructor-004.html +++ b/WebIDL/tests/submissions/heycam/Constructor-004.html @@ -113,9 +113,9 @@ }, "passing an Array object as the only argument to the Blob constructor selects the (sequence<...>, optional BlobPropertyBag) overload"); test(function() { - var b = new Blob({ size: 3, "0": "a" }); - assert_equals(b.size, "aundefinedundefined".size); -}, "passing { size: 3, \"0\": \"a\" } as the only argument to the Blob constructor selects the (sequence<...>, optional BlobPropertyBag) overload"); + var b = new Blob({ length: 3, "0": "a" }); + assert_equals(b.size, "aundefinedundefined".length); +}, "passing { length: 3, \"0\": \"a\" } as the only argument to the Blob constructor selects the (sequence<...>, optional BlobPropertyBag) overload"); test(function() { var b = new Blob(["abc"], { }, "extra"); From d04911e93243ed5d0f0e8562355f54cf5fee8ac1 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 17 Jun 2013 16:47:00 +1000 Subject: [PATCH 103/116] Add a subtest that different Function objects due to implements statements cannot be applied to other objects. --- WebIDL/tests/submissions/heycam/implements-001.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/WebIDL/tests/submissions/heycam/implements-001.html b/WebIDL/tests/submissions/heycam/implements-001.html index 533f7b1b9cdc7e..e0a1cef0fd0b59 100644 --- a/WebIDL/tests/submissions/heycam/implements-001.html +++ b/WebIDL/tests/submissions/heycam/implements-001.html @@ -11,7 +11,8 @@ // The implements statement causes all of the properties that would exist // on the RHS interface's interface object and interface prototype object to // appear on those objects for the LHS interface. If they values of the -// properties are objects, they do not refer to the same object. +// properties are objects, they do not refer to the same object. They +// also can only be applied to the interface that the properties exist on. // feature: URLUtils (interface) (used on RHS of implements statement) @@ -20,4 +21,10 @@ var desc2 = Object.getOwnPropertyDescriptor(HTMLAreaElement.prototype, "href"); assert_true(desc1.get != desc2.get); }, "HTMLAnchorElement.prototype and HTMLAreaElement.prototype have distinct Function objects for their URLUtils.href attribute getter"); + +test(function() { + var desc = Object.getOwnPropertyDescriptor(HTMLAnchorElement.prototype, "href"); + var area = document.createElement("area"); + assert_throws(new TypeError(), function() { desc.get.call(area); }); +}, "HTMLAnchorElement.prototype.href's getter cannot be applied to an HTMLAnchorElement object"); From a1d7326cce3c4f85e9ba743506c681e837ce4d3d Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Tue, 18 Jun 2013 17:30:22 +1000 Subject: [PATCH 104/116] Fix typo in comment. --- WebIDL/tests/submissions/heycam/void-001.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebIDL/tests/submissions/heycam/void-001.html b/WebIDL/tests/submissions/heycam/void-001.html index 838df0042a29a9..43e228a5199c3a 100644 --- a/WebIDL/tests/submissions/heycam/void-001.html +++ b/WebIDL/tests/submissions/heycam/void-001.html @@ -6,7 +6,7 @@
From 0a18201fea60768def73edf9a5893d710df7b549 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 24 Jun 2013 18:08:13 +1000 Subject: [PATCH 106/116] Test updates for spec changes that treat explicit undefined as a missing optional argument. --- .../tests/submissions/heycam/Constructor-004.html | 4 ++-- .../tests/submissions/heycam/operation-002.html | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/Constructor-004.html b/WebIDL/tests/submissions/heycam/Constructor-004.html index e9b97e5a458d32..c81ec3e1f250a8 100644 --- a/WebIDL/tests/submissions/heycam/Constructor-004.html +++ b/WebIDL/tests/submissions/heycam/Constructor-004.html @@ -94,8 +94,8 @@ test(function() { var buffer = new ArrayBuffer(5); var a = new Uint8Array(buffer, undefined, undefined); - assert_equals(a.length, 0); -}, "passing (ArrayBuffer, undefined, undefined) to the Uint8Array constructor selects the (ArrayBuffer, optional unsigned long, optional unsigned long) overload with three arguments"); + assert_equals(a.length, 5); +}, "passing (ArrayBuffer, undefined, undefined) to the Uint8Array constructor selects the (ArrayBuffer, optional unsigned long, optional unsigned long) overload with three arguments and treats the undefineds as missing arguments"); // feature Blob (interface) (with [Constructor] and overloading) diff --git a/WebIDL/tests/submissions/heycam/operation-002.html b/WebIDL/tests/submissions/heycam/operation-002.html index d17aeeb24a2177..eb36d70746d150 100644 --- a/WebIDL/tests/submissions/heycam/operation-002.html +++ b/WebIDL/tests/submissions/heycam/operation-002.html @@ -15,10 +15,11 @@ // Here we're invoking regular operations that do not use overloading // but which do have optional arguments. When too few arguments are passed, // a TypeError is thrown. When too many arguments are passed, the -// extra ones are ignored. Argument types are not used to eliminate -// the single entry in the effective overload set. The function can -// be applied to objects of the right type from other windows. -// Calling it with a bad this object value will throw a TypeError. +// extra ones are ignored. Undefined is treated as a missing optional +// argument. Argument types are not used to eliminate the single entry in the +// effective overload set. The function can be applied to objects of the right +// type from other windows. Calling it with a bad this object value will throw +// a TypeError. // feature: Window.postMessage (operation) (with optional argument) @@ -93,8 +94,8 @@ test(function() { var div = makeDivSpan(document); - assert_equals(div.cloneNode(undefined).firstChild, null); -}, "passing undefined to Node.cloneNode is correctly converted to an IDL boolean"); + assert_not_equals(div.cloneNode(undefined).firstChild, null); +}, "passing undefined to Node.cloneNode is treated as a missing optional argument"); test(function() { var div = makeDivSpan(document.getElementById("iframe").contentDocument); @@ -141,7 +142,7 @@ var option = document.createElement("option"); select.add(option, undefined); assert_equals(select.lastChild, option); -}, "passing undefined to HTMLSelectElement.add is correctly converted to an IDL \"(HTMLElement or long)?\" type"); +}, "passing undefined to HTMLSelectElement.add is treated as a missing optional argument"); test(function() { var doc = document.getElementById("iframe").contentDocument; From 6b44bedafc87271be9098b67768f500dc32ce6c5 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 22 Jul 2013 12:47:08 +1000 Subject: [PATCH 107/116] Note a couple more untested feature specifics. --- WebIDL/tests/submissions/heycam/notes.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WebIDL/tests/submissions/heycam/notes.txt b/WebIDL/tests/submissions/heycam/notes.txt index 7859b73dd25de3..0e46e71025be40 100644 --- a/WebIDL/tests/submissions/heycam/notes.txt +++ b/WebIDL/tests/submissions/heycam/notes.txt @@ -30,6 +30,7 @@ Web IDL features that are not used in specific interesting ways: * implements statement, with more than one consequential interface * operation overloading with distinguishing index > 0 + * operation overloading distinguishing between boolean, numeric types and DOMString * callback interface with multiple operations * callback interface with attribute * exception inheritance @@ -40,6 +41,7 @@ Web IDL features that are not used in specific interesting ways: * enum type as an operation return type or attribute type (IDL -> JS conversion) * stringifier on an operation * interface with a named property setter but not a named property creator + * optional arguments not just in trailing positions Web IDL features that are not used at all: From 5d3d946a92d3323dd94f0d9439bfeadfe6901b4e Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 12 Aug 2013 07:18:33 +1000 Subject: [PATCH 108/116] Update tests for [NamedPropertiesObject] -> [Global] rename. --- .../{NamedPropertiesObject-001.html => Global-001.html} | 4 ++-- .../{NamedPropertiesObject-002.html => Global-002.html} | 4 ++-- .../{NamedPropertiesObject-003.html => Global-003.html} | 4 ++-- .../{NamedPropertiesObject-004.html => Global-004.html} | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename WebIDL/tests/submissions/heycam/{NamedPropertiesObject-001.html => Global-001.html} (90%) rename WebIDL/tests/submissions/heycam/{NamedPropertiesObject-002.html => Global-002.html} (98%) rename WebIDL/tests/submissions/heycam/{NamedPropertiesObject-003.html => Global-003.html} (97%) rename WebIDL/tests/submissions/heycam/{NamedPropertiesObject-004.html => Global-004.html} (96%) diff --git a/WebIDL/tests/submissions/heycam/NamedPropertiesObject-001.html b/WebIDL/tests/submissions/heycam/Global-001.html similarity index 90% rename from WebIDL/tests/submissions/heycam/NamedPropertiesObject-001.html rename to WebIDL/tests/submissions/heycam/Global-001.html index a2613cd0d68b14..991397c5811a6a 100644 --- a/WebIDL/tests/submissions/heycam/NamedPropertiesObject-001.html +++ b/WebIDL/tests/submissions/heycam/Global-001.html @@ -1,5 +1,5 @@ -[NamedPropertiesObject] prototype chain +[Global] prototype chain @@ -11,7 +11,7 @@ // Its [[Prototype]] points to the interface prototype object of any // interface the one [[Prototype]] is on inherits from, or Object.prototype. -// feature: Window (interface) (with [NamedPropertiesObject]) +// feature: Window (interface) (with [Global]) // window -> Window.prototype -> [named properties] -> EventTarget.prototype -> Object.prototype diff --git a/WebIDL/tests/submissions/heycam/NamedPropertiesObject-002.html b/WebIDL/tests/submissions/heycam/Global-002.html similarity index 98% rename from WebIDL/tests/submissions/heycam/NamedPropertiesObject-002.html rename to WebIDL/tests/submissions/heycam/Global-002.html index c5e13ca8d9f116..39649fa9504909 100644 --- a/WebIDL/tests/submissions/heycam/NamedPropertiesObject-002.html +++ b/WebIDL/tests/submissions/heycam/Global-002.html @@ -1,5 +1,5 @@ -[NamedPropertiesObject] property lookup +[Global] property lookup @@ -17,7 +17,7 @@ // [[GetOwnProperty]] also exposes other (expando) properties on the named // properties object. -// feature: Window (interface) (with [NamedPropertiesObject]) +// feature: Window (interface) (with [Global]) var hidden = document.getElementById("hidden"); var form1 = document.getElementById("f1"); diff --git a/WebIDL/tests/submissions/heycam/NamedPropertiesObject-003.html b/WebIDL/tests/submissions/heycam/Global-003.html similarity index 97% rename from WebIDL/tests/submissions/heycam/NamedPropertiesObject-003.html rename to WebIDL/tests/submissions/heycam/Global-003.html index 35b3851693987c..d0aaaf828de7e5 100644 --- a/WebIDL/tests/submissions/heycam/NamedPropertiesObject-003.html +++ b/WebIDL/tests/submissions/heycam/Global-003.html @@ -1,5 +1,5 @@ -[NamedPropertiesObject] property lookup +[Global] property lookup @@ -25,7 +25,7 @@ // EventTarget.prototype and Object.prototype, not to be visible on the named // properties object. -// feature: Window (interface) (with [NamedPropertiesObject]) +// feature: Window (interface) (with [Global]) test(function() { assert_true("document" in window, '"document" in window'); diff --git a/WebIDL/tests/submissions/heycam/NamedPropertiesObject-004.html b/WebIDL/tests/submissions/heycam/Global-004.html similarity index 96% rename from WebIDL/tests/submissions/heycam/NamedPropertiesObject-004.html rename to WebIDL/tests/submissions/heycam/Global-004.html index a5b2bfc2100e1d..7c22913182b5a6 100644 --- a/WebIDL/tests/submissions/heycam/NamedPropertiesObject-004.html +++ b/WebIDL/tests/submissions/heycam/Global-004.html @@ -18,7 +18,7 @@ // Object.seal or Object.preventExtensions on it must fail and throw a // TypeError. -// feature: Window (interface) (with [NamedPropertiesObject]) +// feature: Window (interface) (with [Global]) test(function() { var w = document.getElementById("iframe1").contentWindow; From a01b08208d54da56c86c890d812d57aaa6d5792d Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 12 Aug 2013 07:51:17 +1000 Subject: [PATCH 109/116] Update tests for attribute/operation properties existing on the instance, for [Global] interfaces. --- .../submissions/heycam/attribute-001.html | 53 +++++++++++++++++-- .../submissions/heycam/operation-001.html | 23 +++++--- WebIDL/tests/submissions/heycam/utils.js | 14 +++++ 3 files changed, 80 insertions(+), 10 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/attribute-001.html b/WebIDL/tests/submissions/heycam/attribute-001.html index 6ef5a49e131c6e..c27e8ebb9acdb7 100644 --- a/WebIDL/tests/submissions/heycam/attribute-001.html +++ b/WebIDL/tests/submissions/heycam/attribute-001.html @@ -13,9 +13,10 @@ // 4.4.6 Attributes // // Properties for non-[Unforgeable] attributes exist on the interface prototype -// object and are enumerable and configurable. These are accessor properties -// always have a getter. The getter expects no arguments, and will ignore -// extra ones. The getter can be applied to objects of the right type +// object and are enumerable and configurable. If they're on the [Global] object, +// then the properties will be on the instance instead. These are accessor +// properties always have a getter. The getter expects no arguments, and will +// ignore extra ones. The getter can be applied to objects of the right type // from other windows. Calling it with a bad this object value will throw // a TypeError. @@ -65,4 +66,50 @@ var desc = Object.getOwnPropertyDescriptor(Document.prototype, "title"); assert_equals(desc.get.call(document, "extra"), "Getters for writable attributes"); }, "arguments passed to Document.title getter are ignored"); + +// feature: Window.name (attribute) (writable, without [Unforgeable]) + +test(function() { + assert_true(window.hasOwnProperty("name")); +}, "window has own property \"name\""); + +test(function() { + assert_true(!Window.prototype.hasOwnProperty("name")); +}, "Window.prototype does not have own property \"name\""); + +test(function() { + var desc = Object.getOwnPropertyDescriptor(window, "name"); + assert_descriptor(desc, { enumerable: true, configurable: true }); +}, "window.name has correct property attributes"); + +test(function() { + var desc = Object.getOwnPropertyDescriptor(window, "name"); + assert_equals(typeof desc.get, "function"); + assert_equals(desc.get.length, 0); +}, "window.name has a getter function with the right length"); + +test(function() { + var desc = Object.getOwnPropertyDescriptor(window, "name"); + assert_true(!!desc); + assert_throws(new TypeError(), function() { desc.get.call(document.documentElement); }); +}, "calling Window.name getter with a non-Window object this-value throws"); + +test(function() { + var win = document.getElementById("iframe").contentWindow; + var desc = Object.getOwnPropertyDescriptor(window, "name"); + assert_equals(desc.get.call(win), ""); +}, "calling Window.name getter on a different window object works"); + +test(function() { + var win = document.getElementById("iframe").contentWindow; + win.name = "test"; + var desc = Object.getOwnPropertyDescriptor(window, "name"); + assert_equals(desc.get.call(win), "test"); +}, "calling Window.name getter on an object from a different window works"); + +test(function() { + var desc = Object.getOwnPropertyDescriptor(window, "name"); + assert_equals(desc.get.call(window, "extra"), "Getters for writable attributes"); +}, "arguments passed to Window.name getter are ignored"); + diff --git a/WebIDL/tests/submissions/heycam/operation-001.html b/WebIDL/tests/submissions/heycam/operation-001.html index 7a0224ba22e457..2c202422b13c1b 100644 --- a/WebIDL/tests/submissions/heycam/operation-001.html +++ b/WebIDL/tests/submissions/heycam/operation-001.html @@ -9,9 +9,10 @@ // 4.4.7 Operations // // Regular operations correspond to properties on the interface prototype -// object, which are writable, enumerable and configurable. The .length -// property on the Function object is the shortest valid argument for the -// operation. +// object, which are writable, enumerable and configurable. If they're on +// the [Global] object, then the properties will be on the instance instead. +// The .length property on the Function object is the shortest valid argument +// for the operation. var operations = [ @@ -46,21 +47,29 @@ "FormData", "append", 2 ]; +function operationHome(intf) { +} + +function operationHomeName(intf) { +} + for (var i = 0; i < operations.length; i+= 3) { var intf = operations[i]; var name = operations[i + 1]; var length = operations[i + 2]; + var object = interfaceMemberHome(intf); + var objectName = interfaceMemberHomeName(intf); test(function() { - assert_property(window[intf].prototype, name, { writable: true, enumerable: true, configurable: true }); - }, "the " + intf + ".prototype." + name + " property has the right attributes"); + assert_property(object, name, { writable: true, enumerable: true, configurable: true }); + }, "the " + objectName + " " + name + " property has the right attributes"); test(function() { assert_equals(typeof window[intf].prototype[name], "function"); - }, intf + ".prototype." + name + " property is a function"); + }, objectName + " " + name + " property is a function"); test(function() { assert_property(window[intf].prototype[name], "length", { writable: false, enumerable: false, configurable: false, value: length }); - }, intf + ".prototype." + name + ".length has correct length property"); + }, objectName + " " + name + ".length has correct length property"); } diff --git a/WebIDL/tests/submissions/heycam/utils.js b/WebIDL/tests/submissions/heycam/utils.js index 1b568fb5531e5e..e814332930bc3d 100644 --- a/WebIDL/tests/submissions/heycam/utils.js +++ b/WebIDL/tests/submissions/heycam/utils.js @@ -61,3 +61,17 @@ function prototypeChain(o) { } while (o); return a; } + +function interfaceMemberHome(intf) { + if (intf == 'Window') { + return window; + } + return window[intf].prototype; +} + +function interfaceMemberHomeName(intf) { + if (intf == 'Window') { + return "window instance"; + } + return intf + ".prototype"; +} From c9bc35b2cc89c4501121dc786ca0fb8be1364c6d Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 12 Aug 2013 07:51:48 +1000 Subject: [PATCH 110/116] Update feature lists. --- WebIDL/tests/submissions/heycam/features-by-type.txt | 3 ++- WebIDL/tests/submissions/heycam/features.txt | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/features-by-type.txt b/WebIDL/tests/submissions/heycam/features-by-type.txt index 81ba8903a3db4f..a80cbd5014df43 100644 --- a/WebIDL/tests/submissions/heycam/features-by-type.txt +++ b/WebIDL/tests/submissions/heycam/features-by-type.txt @@ -38,6 +38,7 @@ attribute WheelEvent.deltaMode (of type unsigned long - unsigned-long-003.html) Window.document (with [Unforgeable] - Unforgeable-001.html) Window.length (with [Replaceable] - Replaceable-001.html) + Window.name (writable, without [Unforgeable] - attribute-001.html) Window.self (with [Replaceable] - Replaceable-001.html) callback interface NodeFilter (with constants - interface-001.html, interface-object-002.html) @@ -96,7 +97,7 @@ interface Uint8Array (supports indexed properties - indexed-properties-001.html) (supports indexed properties, does not support named properties - property-enumeration-001.html) (supports indexed properties, has an indexed property setter, does not have an indexed property creator - indexed-properties-004.html) WebSocket (with [Constructor] and optional arguments - Constructor-003.html) WheelEvent (with constructor with argument of type unsigned long - unsigned-long-002.html) - Window (with [NamedPropertiesObject] - class-string-001.html, extensible-001.html, initial-001.html, initial-002.html, NamedPropertiesObject-001.html, NamedPropertiesObject-002.html, NamedPropertiesObject-003.html, NamedPropertiesObject-004.html) + Window (with [Global] - Global-001.html, Global-002.html, Global-003.html, Global-004.html) (with [NamedPropertiesObject] - class-string-001.html, extensible-001.html, initial-001.html, initial-002.html) WindowTimers (with [NoInterfaceObject] - NoInterfaceObject-001.html) XMLHttpRequest (with [Constructor] - Constructor-001.html) (with inheritance, with [Constructor] - functions-001.html) named property creator diff --git a/WebIDL/tests/submissions/heycam/features.txt b/WebIDL/tests/submissions/heycam/features.txt index 54801784a0525c..dc28535414f62c 100644 --- a/WebIDL/tests/submissions/heycam/features.txt +++ b/WebIDL/tests/submissions/heycam/features.txt @@ -547,21 +547,25 @@ WheelEvent.deltaMode (attribute) of type unsigned long unsigned-long-003.html Window (interface) + with [Global] + Global-001.html + Global-002.html + Global-003.html + Global-004.html with [NamedPropertiesObject] class-string-001.html extensible-001.html initial-001.html initial-002.html - NamedPropertiesObject-001.html - NamedPropertiesObject-002.html - NamedPropertiesObject-003.html - NamedPropertiesObject-004.html Window.document (attribute) with [Unforgeable] Unforgeable-001.html Window.length (attribute) with [Replaceable] Replaceable-001.html +Window.name (attribute) + writable, without [Unforgeable] + attribute-001.html Window.postMessage (operation) with optional argument operation-001.html From e354483c37f487f421c417da366e800d187a4e51 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 12 Aug 2013 07:55:18 +1000 Subject: [PATCH 111/116] Update test for stringifiers not calling [[Get]]. --- .../submissions/heycam/stringifier-002.html | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/stringifier-002.html b/WebIDL/tests/submissions/heycam/stringifier-002.html index 22d3cc9f7dc30c..68f0bc84c418d7 100644 --- a/WebIDL/tests/submissions/heycam/stringifier-002.html +++ b/WebIDL/tests/submissions/heycam/stringifier-002.html @@ -8,10 +8,11 @@ From 3af69498bea04ab6f64c018d1fa347c53a9e58ff Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 12 Aug 2013 07:55:51 +1000 Subject: [PATCH 112/116] Comment fix. --- WebIDL/tests/submissions/heycam/named-properties-002.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebIDL/tests/submissions/heycam/named-properties-002.html b/WebIDL/tests/submissions/heycam/named-properties-002.html index 0df30869a0bb6e..f6e420ff4e966a 100644 --- a/WebIDL/tests/submissions/heycam/named-properties-002.html +++ b/WebIDL/tests/submissions/heycam/named-properties-002.html @@ -11,7 +11,7 @@ // 4.6.2 Platform object [[GetOwnProperty]] method // // If an object supports named properties, then own properties exist on the -// object corresponding to the supported property indexes. Each property is +// object corresponding to the supported property names. Each property is // exposed through [[GetOwnProperty]] as being enumerable, configurable, // and writable if there is also an named property setter. // From 072456ba519e58ce6e51ec34f1a81a61055f7c23 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 12 Aug 2013 08:11:57 +1000 Subject: [PATCH 113/116] Update [Global] tests for named properties object not supporting expando properties, and update manifest. --- .../tests/submissions/heycam/Global-002.html | 82 ------------------- .../tests/submissions/heycam/Global-005.html | 20 +++++ .../tests/submissions/heycam/Global-006.html | 26 ++++++ WebIDL/tests/submissions/heycam/manifest.txt | 10 ++- 4 files changed, 52 insertions(+), 86 deletions(-) create mode 100644 WebIDL/tests/submissions/heycam/Global-005.html create mode 100644 WebIDL/tests/submissions/heycam/Global-006.html diff --git a/WebIDL/tests/submissions/heycam/Global-002.html b/WebIDL/tests/submissions/heycam/Global-002.html index 39649fa9504909..ccbac362e09322 100644 --- a/WebIDL/tests/submissions/heycam/Global-002.html +++ b/WebIDL/tests/submissions/heycam/Global-002.html @@ -14,8 +14,6 @@ // 4.4.4.1 Named properties object [[GetOwnProperty]] method // // Named properties are exposed as data properties through [[GetOwnProperty]]. -// [[GetOwnProperty]] also exposes other (expando) properties on the named -// properties object. // feature: Window (interface) (with [Global]) @@ -47,86 +45,6 @@ assert_descriptor(desc, { writable: false, enumerable: true, configurable: true, value: form1 }, "f1"); }, "named properties are exposed correctly through [[GetOwnProperty]]"); -test(function() { - var namedPropertiesObject = Object.getPrototypeOf(Window.prototype); - namedPropertiesObject.expando1 = 1; - assert_equals(window.expando1, 1); -}, "expando properties on the named properties object are exposed through window"); - -test(function() { - var namedPropertiesObject = Object.getPrototypeOf(Window.prototype); - - // Ensure there's already a named property "f2". - assert_property(namedPropertiesObject, "f2", { writable: false, enumerable: true, configurable: true, value: form2 }, "#1 namedPropertiesObject.f2"); - - // Define a property with the same name. - Object.defineProperty(namedPropertiesObject, "f2", { writable: false, enumerable: false, configurable: true, value: "hello" }); - - // The expando should now be exposed, since the named property visibility - // algorithm should prevent the named property from shadowing it. - assert_property(namedPropertiesObject, "f2", { writable: false, enumerable: false, configurable: true, value: "hello" }, "#2 namedPropertiesObject.f2"); - - // Remove the named property. - form2.parentNode.removeChild(form2); - - // The expando should still be exposed. - assert_property(namedPropertiesObject, "f2", { writable: false, enumerable: false, configurable: true, value: "hello" }, "#3 namedPropertiesObject.f2"); -}, "expando properties with the same as named properties can be set and will shadow named properties"); - -test(function() { - var namedPropertiesObject = Object.getPrototypeOf(Window.prototype); - - // Define an expando property. - Object.defineProperty(namedPropertiesObject, "f3", { writable: false, enumerable: false, configurable: true, value: "hello" }); - - // Check that it's there. - assert_property(namedPropertiesObject, "f3", { writable: false, enumerable: false, configurable: true, value: "hello" }, "#1 namedPropertiesObject.f3"); - - // Cause a named property with the same name to start existing. - var e = document.createElement("form"); - e.name = "f3"; - hidden.appendChild(e); - - // The expando should shadow the named property. - assert_property(namedPropertiesObject, "f3", { writable: false, enumerable: false, configurable: true, value: "hello" }, "#2 namedPropertiesObject.f3"); - - // Remove the named property. - hidden.removeChild(e); - - // The expando should still be visible. - assert_property(namedPropertiesObject, "f3", { writable: false, enumerable: false, configurable: true, value: "hello" }, "#3 namedPropertiesObject.f3"); -}, "named properties will not shadow an existing expando property"); - -test(function() { - var namedPropertiesObject = Object.getPrototypeOf(Window.prototype); - - // Define an expando property. - Object.defineProperty(namedPropertiesObject, "f4", { writable: false, enumerable: false, configurable: true, value: "hello" }); - - // Check that it's there. - assert_property(namedPropertiesObject, "f4", { writable: false, enumerable: false, configurable: true, value: "hello" }, "#1 namedPropertiesObject.f4"); - - // Cause a named property with the same name to start existing. - var e = document.createElement("form"); - e.name = "f4"; - hidden.appendChild(e); - - // The expando should shadow the named property. - assert_property(namedPropertiesObject, "f4", { writable: false, enumerable: false, configurable: true, value: "hello" }, "#2 namedPropertiesObject.f4"); - - // Remove the expando. - assert_true(delete namedPropertiesObject.f4, "delete namedPropertiesObject.f4"); - - // The named property should now be visible. - assert_property(namedPropertiesObject, "f4", { writable: false, enumerable: true, configurable: true, value: e }, "#3 namedPropertiesObject.f4"); - - // Remove the named property. - hidden.removeChild(e); - - // There shouldn't be anything there now. - assert_true(!Object.getOwnPropertyDescriptor(namedPropertiesObject, "f4"), "existence of namedPropertiesObject.f4"); -}, "removing an expando property will reveal a shadowed named property"); - // XXX We probably shouldn't allow non-configurable properties to be defined // on the named properties object: https://www.w3.org/Bugs/Public/show_bug.cgi?id=21929 // Once that bug is resolved, we should test this. diff --git a/WebIDL/tests/submissions/heycam/Global-005.html b/WebIDL/tests/submissions/heycam/Global-005.html new file mode 100644 index 00000000000000..82ca75126d2f1d --- /dev/null +++ b/WebIDL/tests/submissions/heycam/Global-005.html @@ -0,0 +1,20 @@ + +Named properties object [[DefineOwnProperty]] + + + +
+ + diff --git a/WebIDL/tests/submissions/heycam/Global-006.html b/WebIDL/tests/submissions/heycam/Global-006.html new file mode 100644 index 00000000000000..8544cbb53f994b --- /dev/null +++ b/WebIDL/tests/submissions/heycam/Global-006.html @@ -0,0 +1,26 @@ + +Named properties object [[DefineOwnProperty]] + + + +
+ + + + diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index 12621a27e9a6eb..e850bb39ea8a6a 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -12,10 +12,12 @@ Date-002.html EnforceRange-001.html LenientThis-001.html NamedConstructor-001.html -NamedPropertiesObject-001.html -NamedPropertiesObject-002.html -NamedPropertiesObject-003.html -NamedPropertiesObject-004.html +Global-001.html +Global-002.html +Global-003.html +Global-004.html +Global-005.html +Global-006.html NoInterfaceObject-001.html OverrideBuiltins-001.html OverrideBuiltins-002.html From eb9133190c60fce8f4f985c774680a91eaa637bf Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 12 Aug 2013 08:13:28 +1000 Subject: [PATCH 114/116] Fix typo, reorder. --- WebIDL/tests/submissions/heycam/manifest.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/manifest.txt b/WebIDL/tests/submissions/heycam/manifest.txt index e850bb39ea8a6a..e35714eac3c5a2 100644 --- a/WebIDL/tests/submissions/heycam/manifest.txt +++ b/WebIDL/tests/submissions/heycam/manifest.txt @@ -10,14 +10,14 @@ DOMString-003.html Date-001.html Date-002.html EnforceRange-001.html -LenientThis-001.html -NamedConstructor-001.html Global-001.html Global-002.html Global-003.html Global-004.html Global-005.html Global-006.html +LenientThis-001.html +NamedConstructor-001.html NoInterfaceObject-001.html OverrideBuiltins-001.html OverrideBuiltins-002.html @@ -74,7 +74,7 @@ instanceof-001.html interface-001.html interface-object-001.html interface-object-002.html -interface-protoype-object-001.html +interface-prototype-object-001.html interface-type-001.html interface-type-002.html interface-type-003.html From 8514dcc6bc72538b0c604b397706f7dff2f0e55f Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Mon, 12 Aug 2013 08:26:31 +1000 Subject: [PATCH 115/116] Update section numbering. --- WebIDL/tests/submissions/heycam/ArrayClass-001.html | 2 +- WebIDL/tests/submissions/heycam/Constructor-001.html | 2 +- WebIDL/tests/submissions/heycam/Constructor-002.html | 2 +- WebIDL/tests/submissions/heycam/Constructor-003.html | 2 +- WebIDL/tests/submissions/heycam/Constructor-004.html | 2 +- WebIDL/tests/submissions/heycam/Global-001.html | 2 +- WebIDL/tests/submissions/heycam/Global-002.html | 2 +- WebIDL/tests/submissions/heycam/Global-003.html | 2 +- WebIDL/tests/submissions/heycam/Global-004.html | 2 +- WebIDL/tests/submissions/heycam/LenientThis-001.html | 2 +- WebIDL/tests/submissions/heycam/NamedConstructor-001.html | 2 +- WebIDL/tests/submissions/heycam/NoInterfaceObject-001.html | 2 +- WebIDL/tests/submissions/heycam/OverrideBuiltins-001.html | 2 +- WebIDL/tests/submissions/heycam/OverrideBuiltins-002.html | 2 +- WebIDL/tests/submissions/heycam/PutForwards-001.html | 2 +- WebIDL/tests/submissions/heycam/Replaceable-001.html | 2 +- WebIDL/tests/submissions/heycam/Unforgeable-001.html | 2 +- WebIDL/tests/submissions/heycam/attribute-001.html | 2 +- WebIDL/tests/submissions/heycam/attribute-002.html | 2 +- WebIDL/tests/submissions/heycam/attribute-003.html | 2 +- WebIDL/tests/submissions/heycam/attribute-004.html | 2 +- WebIDL/tests/submissions/heycam/attribute-005.html | 2 +- WebIDL/tests/submissions/heycam/attribute-006.html | 2 +- WebIDL/tests/submissions/heycam/constant-001.html | 2 +- WebIDL/tests/submissions/heycam/constant-002.html | 2 +- WebIDL/tests/submissions/heycam/implements-001.html | 2 +- WebIDL/tests/submissions/heycam/indexed-properties-001.html | 2 +- WebIDL/tests/submissions/heycam/indexed-properties-002.html | 2 +- WebIDL/tests/submissions/heycam/indexed-properties-003.html | 2 +- WebIDL/tests/submissions/heycam/indexed-properties-004.html | 2 +- WebIDL/tests/submissions/heycam/indexed-properties-005.html | 2 +- WebIDL/tests/submissions/heycam/instanceof-001.html | 2 +- WebIDL/tests/submissions/heycam/interface-001.html | 2 +- WebIDL/tests/submissions/heycam/interface-object-001.html | 2 +- WebIDL/tests/submissions/heycam/interface-object-002.html | 2 +- .../submissions/heycam/interface-prototype-object-001.html | 2 +- WebIDL/tests/submissions/heycam/legacy-caller-001.html | 2 +- WebIDL/tests/submissions/heycam/named-properties-001.html | 2 +- WebIDL/tests/submissions/heycam/named-properties-002.html | 2 +- WebIDL/tests/submissions/heycam/named-properties-003.html | 2 +- WebIDL/tests/submissions/heycam/named-properties-004.html | 2 +- WebIDL/tests/submissions/heycam/named-properties-005.html | 2 +- WebIDL/tests/submissions/heycam/operation-001.html | 2 +- WebIDL/tests/submissions/heycam/operation-002.html | 2 +- WebIDL/tests/submissions/heycam/operation-003.html | 2 +- WebIDL/tests/submissions/heycam/operation-004.html | 2 +- WebIDL/tests/submissions/heycam/platform-object-001.html | 2 +- WebIDL/tests/submissions/heycam/property-enumeration-001.html | 2 +- WebIDL/tests/submissions/heycam/stringifier-001.html | 2 +- WebIDL/tests/submissions/heycam/stringifier-002.html | 2 +- 50 files changed, 50 insertions(+), 50 deletions(-) diff --git a/WebIDL/tests/submissions/heycam/ArrayClass-001.html b/WebIDL/tests/submissions/heycam/ArrayClass-001.html index 837184531f9258..d2e9885b8d0151 100644 --- a/WebIDL/tests/submissions/heycam/ArrayClass-001.html +++ b/WebIDL/tests/submissions/heycam/ArrayClass-001.html @@ -6,7 +6,7 @@