SVG2: Test foreignObject is a graphics element#8135
SVG2: Test foreignObject is a graphics element#8135ewilligers merged 1 commit intoweb-platform-tests:masterfrom
Conversation
| <h:script><![CDATA[ | ||
| test(function() { | ||
| var target = document.getElementById('target'); | ||
| assert_true(target instanceof SVGGraphicsElement); |
There was a problem hiding this comment.
instanceof is defined to walk the entire prototype chain; we should be able to assert something more specific as to where exactly it is in the prototype chain.
I think what we want is assert_equals(target.__proto__.__proto__, SVGGraphicsElement.prototype)?
That said, this is essentially just testing interface SVGForeignObjectElement : SVGGraphicsElement, i.e., what interface SVGForeignObjectElement inherits from I believe? That, at least, will be tested by idlharness.js in /svg/interfaces.html, specifically by the test it creates with the name of "SVGForeignObjectElement interface: existence and properties of interface object".
Build PASSEDStarted: 2017-11-09 22:48:45 View more information about this build on: |
cf2fa05 to
966b257
Compare
| <svg xmlns="http://www.w3.org/2000/svg" | ||
| xmlns:h="http://www.w3.org/1999/xhtml"> | ||
| <metadata> | ||
| <link xmlns="http://www.w3.org/1999/xhtml" rel="help" href="https://www.w3.org/TR/2013/WD-SVG2-20130618/extend.html#ForeignObjectElement"/> |
There was a problem hiding this comment.
Do we really want to link to such an old version of the spec? Aside from that LGTM. Fix if you want or I'll merge in a minute.
Tests change https://svgwg.org/svg2-draft/changes.html#extend "Made ‘foreignObject’ a graphics element."
966b257 to
770da9f
Compare
Tests change
https://svgwg.org/svg2-draft/changes.html#extend
"Made ‘foreignObject’ a graphics element."