Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Unified Diff: LayoutTests/svg/dom/svg2-inheritance.html

Issue 20739003: Add layout test to validate the SVG2 inheritance model (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Simplify test Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/svg/dom/svg2-inheritance-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/dom/svg2-inheritance.html
diff --git a/LayoutTests/svg/dom/svg2-inheritance.html b/LayoutTests/svg/dom/svg2-inheritance.html
new file mode 100644
index 0000000000000000000000000000000000000000..f9aed920dde46544eb52ecd94baeb973294d69de
--- /dev/null
+++ b/LayoutTests/svg/dom/svg2-inheritance.html
@@ -0,0 +1,151 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="help" href="http://www.w3.org/TR/2013/WD-SVG2-20130618/" />
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<script>
+description("Validates the SVG2 inheritance model.");
+
+function checkParent(type, expectedParent)
+{
+ // Using shouldBe() would lead to not very readable output here.
+ if (!window[type]) {
+ testFailed(type + " is not defined");
+ return;
+ }
+ var parentPrototype = window[type].prototype.__proto__;
+ var expectedPrototype = window[expectedParent] ? window[expectedParent].prototype : null;
+
+ if (expectedPrototype && parentPrototype === expectedPrototype)
+ testPassed(type + " inherits " + expectedParent);
+ else
+ testFailed(type + " should inherit " + expectedParent + " but got " + parentPrototype.constructor.name + " instead");
+}
+
+checkParent("SVGAElement", "SVGGraphicsElement");
+checkParent("SVGAltGlyphDefElement", "SVGElement");
+checkParent("SVGAltGlyphElement", "SVGTextPositioningElement");
+checkParent("SVGAltGlyphItemElement", "SVGElement");
+checkParent("SVGAngle", "Object");
+checkParent("SVGAnimateColorElement", "SVGAnimationElement");
+checkParent("SVGAnimateElement", "SVGAnimationElement");
+checkParent("SVGAnimateMotionElement", "SVGAnimationElement");
+checkParent("SVGAnimateTransformElement", "SVGAnimationElement");
+checkParent("SVGAnimatedAngle", "Object");
+checkParent("SVGAnimatedBoolean", "Object");
+checkParent("SVGAnimatedEnumeration", "Object");
+checkParent("SVGAnimatedInteger", "Object");
+checkParent("SVGAnimatedLength", "Object");
+checkParent("SVGAnimatedLengthList", "Object");
+checkParent("SVGAnimatedNumber", "Object");
+checkParent("SVGAnimatedNumberList", "Object");
+checkParent("SVGAnimatedPathData", "Object");
+checkParent("SVGAnimatedPreserveAspectRatio", "Object");
+checkParent("SVGAnimatedRect", "Object");
+checkParent("SVGAnimatedString", "Object");
+checkParent("SVGAnimatedTransformList", "Object");
+checkParent("SVGAnimationElement", "SVGElement");
+checkParent("SVGCSSRule", "CSSRule");
+checkParent("SVGCircleElement", "SVGGeometryElement");
+checkParent("SVGClipPathElement", "SVGDefinitionElement");
+checkParent("SVGColorProfileElement", "SVGElement");
+checkParent("SVGColorProfileRule", "SVGCSSRule");
+checkParent("SVGCursorElement", "SVGElement");
+checkParent("SVGDefsElement", "SVGGraphicsElement");
+checkParent("SVGDescElement", "SVGElement");
+checkParent("SVGElement", "Element");
+checkParent("SVGElementInstance", "EventTarget");
+checkParent("SVGElementInstanceList", "Object");
+checkParent("SVGEllipseElement", "SVGGeometryElement");
+checkParent("SVGFontElement", "SVGElement");
+checkParent("SVGFontFaceElement", "SVGElement");
+checkParent("SVGFontFaceFormatElement", "SVGElement");
+checkParent("SVGFontFaceNameElement", "SVGElement");
+checkParent("SVGFontFaceSrcElement", "SVGElement");
+checkParent("SVGFontFaceUriElement", "SVGElement");
+checkParent("SVGForeignObjectElement", "SVGGraphicsElement");
+checkParent("SVGGElement", "SVGGraphicsElement");
+checkParent("SVGGeometryElement", "SVGGraphicsElement");
+checkParent("SVGGlyphElement", "SVGElement");
+checkParent("SVGGlyphRefElement", "SVGElement");
+checkParent("SVGGradientElement", "SVGElement");
+checkParent("SVGGraphicsElement", "SVGElement");
+checkParent("SVGHKernElement", "SVGElement");
+checkParent("SVGImageElement", "SVGGraphicsElement");
+checkParent("SVGLength", "Object");
+checkParent("SVGLengthList", "Object");
+checkParent("SVGLineElement", "SVGGeometryElement");
+checkParent("SVGLinearGradientElement", "SVGGradientElement");
+checkParent("SVGMPathElement", "SVGElement");
+checkParent("SVGMarkerElement", "SVGElement");
+checkParent("SVGMarkerInstance", "Object");
+checkParent("SVGMarkerList", "Object");
+checkParent("SVGMaskElement", "SVGDefinitionElement");
+checkParent("SVGMatrix", "Object");
+checkParent("SVGMeshGradientElement", "SVGGradientElement");
+checkParent("SVGMeshPatchElement", "SVGElement");
+checkParent("SVGMeshRowElement", "SVGElement");
+checkParent("SVGMetadataElement", "SVGElement");
+checkParent("SVGMissingGlyphElement", "SVGElement");
+checkParent("SVGNumber", "Object");
+checkParent("SVGNumberList", "Object");
+checkParent("SVGPathElement", "SVGGeometryElement");
+checkParent("SVGPathSeg", "Object");
+checkParent("SVGPathSegArcAbs", "SVGPathSeg");
+checkParent("SVGPathSegArcRel", "SVGPathSeg");
+checkParent("SVGPathSegClosePath", "SVGPathSeg");
+checkParent("SVGPathSegCurvetoCubicAbs", "SVGPathSeg");
+checkParent("SVGPathSegCurvetoCubicRel", "SVGPathSeg");
+checkParent("SVGPathSegCurvetoCubicSmoothAbs", "SVGPathSeg");
+checkParent("SVGPathSegCurvetoCubicSmoothRel", "SVGPathSeg");
+checkParent("SVGPathSegCurvetoQuadraticAbs", "SVGPathSeg");
+checkParent("SVGPathSegCurvetoQuadraticRel", "SVGPathSeg");
+checkParent("SVGPathSegCurvetoQuadraticSmoothAbs", "SVGPathSeg");
+checkParent("SVGPathSegCurvetoQuadraticSmoothRel", "SVGPathSeg");
+checkParent("SVGPathSegLinetoAbs", "SVGPathSeg");
+checkParent("SVGPathSegLinetoHorizontalAbs", "SVGPathSeg");
+checkParent("SVGPathSegLinetoHorizontalRel", "SVGPathSeg");
+checkParent("SVGPathSegLinetoRel", "SVGPathSeg");
+checkParent("SVGPathSegLinetoVerticalAbs", "SVGPathSeg");
+checkParent("SVGPathSegLinetoVerticalRel", "SVGPathSeg");
+checkParent("SVGPathSegList", "Object");
+checkParent("SVGPathSegMovetoAbs", "SVGPathSeg");
+checkParent("SVGPathSegMovetoRel", "SVGPathSeg");
+checkParent("SVGPatternElement", "SVGElement");
+checkParent("SVGPoint", "Object");
+checkParent("SVGPointList", "Object");
+checkParent("SVGPolygonElement", "SVGGeometryElement");
+checkParent("SVGPolylineElement", "SVGGeometryElement");
+checkParent("SVGPreserveAspectRatio", "Object");
+checkParent("SVGRadialGradientElement", "SVGGradientElement");
+checkParent("SVGRect", "Object");
+checkParent("SVGRectElement", "SVGGeometryElement");
+checkParent("SVGSVGElement", "SVGGraphicsElement");
+checkParent("SVGScriptElement", "SVGElement");
+checkParent("SVGSetElement", "SVGAnimationElement");
+checkParent("SVGStopElement", "SVGElement");
+checkParent("SVGStringList", "Object");
+checkParent("SVGStyleElement", "SVGElement");
+checkParent("SVGSwitchElement", "SVGGraphicsElement");
+checkParent("SVGSymbolElement", "SVGElement");
+checkParent("SVGTRefElement", "SVGTextPositioningElement");
+checkParent("SVGTSpanElement", "SVGTextPositioningElement");
+checkParent("SVGTextContentElement", "SVGGraphicsElement");
+checkParent("SVGTextElement", "SVGTextPositioningElement");
+checkParent("SVGTextPathElement", "SVGTextContentElement");
+checkParent("SVGTextPositioningElement", "SVGTextContentElement");
+checkParent("SVGTitleElement", "SVGElement");
+checkParent("SVGTransform", "Object");
+checkParent("SVGTransformList", "Object");
+checkParent("SVGUseElement", "SVGGraphicsElement");
+checkParent("SVGVKernElement", "SVGElement");
+checkParent("SVGViewElement", "SVGElement");
+checkParent("SVGViewSpec", "Object");
+checkParent("SVGZoomEvent", "UIEvent");
+checkParent("TimeEvent", "Event");
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/svg/dom/svg2-inheritance-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698