This page is an archive of the previous Group's wiki from http://www.w3.org/Graphics/SVG/Group/wiki.
Test Coverage for SVG Tiny 1.2 Appendix A: The SVG Micro DOM (uDOM)
- is a comment or note
✓ is an assertion or feature that is fully covered in the test suite
# is an assertion or feature that is partially or not covered in the test suite
A.2.1 Document Access
- "One way to gain access to the Document object is to implement the EventListenerInitializer2 interface. The SVG Tiny user agent will invoke the implementation’s initializeEventListeners method once the programming logic has been loaded and is ready to bind to the document."
- impossible to test EventListenerInitializer2 from ECMAScript.
A.3.1 Attribute/Property Normalization
- might be hard to make tests for normalization, since it is optional. ← still some tests could be made, e.g. getting an SVGPath and ensuring no 'A' commands are in it
A.3.2 Text Content Access
✓ test of getTrait/setTrait with '#text' on desc,title,metadata,text,tspan,textArea.
✓ test existence of each ExceptionCode on DOMException.
✓ simple tests of namespaceURI/localName/parentNode/ownerDocument.
✓ test textContent and that it removes child elements when setting.
✓ test appendChild
✓ test insertBefore.
✓ test removeChild.
✓ test cloneNode.
# append/remove elements which cause other elements to change (e.g. adding elements with ids so that urirefs become valid).
✓ test getAttribute(NS).
✓ test setAttribute(NS).
- testing 'implementation' seems impossible.
✓ simple test of createElementNS for each element.
✓ simple test of documentElement.
✓ test getElementById for id and xml:id.
✓ test all attributes.
- nothing to test.
✓ test add/removeEventListener(NS).
✓ test an EventListener given by a plain function.
✓ test an EventListener given by an object with a .handleEvent property.
✓ test target,currentTarget,type,namespaceURI,cancelable.
✓ test stopPropagation.
✓ test defaultPrevented,preventDefault.
✓ interactive tests for the various mouse events, testing button/clientX/Y.
- screenX/Y probably not.
✓ interactive test, make sure it is dispatched. - udom-event-210-t.svg
# make sure it is dispatched only to the document element. - udom-event-206-t.svg
✓ simple text input event test.
- hard to test, are there any common keys across devices? this part of dom3ev is unstable anyway.
✓ test detail for events that care about it.
- worth having a test for this, if it will be moved out to webapi?
- I was going to work on some tests for that this week in WebAPI. I hope the spec will get to last call in June - it is due for publication as a WD checking if it is ready for LC as soon as W3C get back from the WWW/AC in Beijing. Chaals
- same, worth doing this? would be hard to test anyway.
✓ test beginElement(At).
✓ test endElement(At).
✓ test existence of ExceptionCode numbers.
✓ test ExceptionCode constants.
✓ test global refers to the global script object.
✓ test various simple and complex use trees to ensure their correspondingElement and correspondingUseElement attributes are set properly .
✓ test NAV_ constants.
✓ test setting currentScale to a valid/invalid value.
✓ test setting currentRotate to valid values
# test setting current to valid values.
✓ test that viewport is readonly.
# test that viewport.x and .y are 0 (?? - only if standalone svg).
✓ test that getCurrentTime returns a "sensible" value.
# test that setCurrentTime results in a "sensible" getCurrentTime afterwards.
✓ test that createSVGMatrixComponents does create an SVGMatrix with the right values.
✓ test that createSVGRect results in a valid SVGRect object.
✓ test that createSVGPath results in a valid SVGPath object.
# test that createSVGRBColor results in a valid, mutable SVGRGBColor object.
# test that calling moveFocus will dispatch DOMFocusOut then DOMFocusIn, with correct .target values. also test that invalid focus moves (both lack of nav-* attribute, and an invalid nav-* attribute) result in a DOMException with no events dispatched.
# test that initial focus is on the SVGDocument.
# test moveFocus with an invalid constant passed to it.
# test setFocus, similar to moveFocus tests.
# test getCurrentFocusedObject after various focus moves.
# test red/green/blue values for the predefined colour constants, and the different colour syntaxes.
# test existence of x/y/width/height as floats.
# test existence of x/y as floats.
# test path constants.
# test path segment querying methods on existing paths, including tests for DOMException raised with invalid path seg index.
# test path modification using moveTo/lineTo/quadTo/curveTo/close.
# test getComponent on a matrix given in a transform attribute, and test invalid index raising an exception.
# test mMultiply and resulting component values, and return value.
# test invert and resulting component values, and exception thrown on non-invertable matrix.
# test mTranslate and resulting component values, and return value.
# test mScale and resulting component values, and return value.
# test mRotate and resulting component values, and return value.
# many getBBox tests on different graphical objects, test that null is returned for elements not in the document tree, test that getBBox is not live.
# test getScreenCTM for various nested transforms, test that it is not live.
# test getScreenBBox for various nested transforms, test that it is not live.
- impossible to test "attempting to access an undefined trait may throw an exception".
- tests for returned normalised values?
# test for incorrect accessor type throwing exceptions.
# test that computed values are returned for accessors of property attributes (inherited value, initial value).
# test for accessing non-property attributes (inherited, default value, null).
# test that getTrait* methods return base values, except that inherited values are the animated inherited values.
# test that getPresentationTrait* methods return animated values, or base if not animated.
# test setTrait* methods with valid/invalid/inherit values, with INVALID_ACCESS_ERR thrown for values "in error" or invalid "with regards to animations currently applied to the trait", and NOT_SUPPORTED_ERR for unsupported values.
# test that trait methods do not with with QName arguments.
# test that getTrait(X) is equivalent to getTraitNS(null, X).
# test that trait accessors that return objects are not live.
# test getRGBColorTrait (and getRGBColorPresentationTrait) throws TYPE_MISMATCH_ERR for 'none' or paint server references.
# test setTraitNS for xlink:href with an invalid uri.
# test set*Trait with null object passed in, throwing an exception.
# test setRectTrait with a SVGRect with negative width/height.
# test setPathTrait with an SVGPath that starts with a non-MOVE_TO command.
- no more default values for testing? (see )
# test that getTrait is supported for the same traits as getTraitNS, getPresentationTrait, getPresentationTraitNS.
# test that if get*Trait is supported, that get*PresentationTrait is supported.
# test that if setTrait is supported, setTraitNS is supported.
# test that traits cannot be used for font descriptors.
A.8.13 Additional accessing rules
# (as above) test that TYPE_MISMATCH_ERR is thrown for getRGBColorTrait for non-colours.
# test getMatrixTrait on ref(svg) and 'none'.
# test that 'display' always deals with 'none' and 'inline'.
- test for animation/font element trait setting while in the document?
# test id attribute, for combinations of IDs and xml:ids.
✓ test pausing and unpausing of elements
# checking isPaused, also for the case of an element past its active duration.
- nothing to test.
# test detail for repeatEvent events.
- ignore createConnection/createTimer for now?
✓ test gotoLocation, just navigates to a “success” page
- should also test an invalid document, and "".
# test document is the same as the current document.
- ignore parent?
# test binaryToString just with the encodings specified. @@ is it allowed to assume that ES strings are UTF-16? if so, a tricky test might be to decode a UCS-4 string containing Plane 1 characters, ensuring that the ES string results in surrogates.
# test binaryToString with an invalid sequence of octets in the given encoding.
# test stringToBinary, same tests as above.
✓ test for getURL.
✓ test for postURL.
✓ test parseXML with valid XML.
# test parseXML with valid XML 1.1, invalid XML, namespace un-wellformed.
# test for parseXML, that ownerDocument is set appropriately, scripts are not executed, that XSLT is not applied. @@ tests for when contextDoc is and isn’t null, what’s the difference?
# test that the operationComplete method is called in the getURL/postURL tests, and that the status object is given.
# test success/contentType/content, according to what’s known about the resource that’s fetched as part of the test. Should test various encodings.