Skip to content

SVG2: Test foreignObject is a graphics element#8135

Merged
ewilligers merged 1 commit intoweb-platform-tests:masterfrom
ewilligers:extensibility
Nov 9, 2017
Merged

SVG2: Test foreignObject is a graphics element#8135
ewilligers merged 1 commit intoweb-platform-tests:masterfrom
ewilligers:extensibility

Conversation

@ewilligers
Copy link
Contributor

@ewilligers ewilligers commented Nov 9, 2017

Tests change
https://svgwg.org/svg2-draft/changes.html#extend
"Made ‘foreignObject’ a graphics element."

<h:script><![CDATA[
test(function() {
var target = document.getElementById('target');
assert_true(target instanceof SVGGraphicsElement);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

@ghost
Copy link

ghost commented Nov 9, 2017

Build PASSED

Started: 2017-11-09 22:48:45
Finished: 2017-11-09 22:53:09

View more information about this build on:

<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"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ewilligers ewilligers merged commit 288fd16 into web-platform-tests:master Nov 9, 2017
@ewilligers ewilligers deleted the extensibility branch November 9, 2017 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants