Index: third_party/WebKit/LayoutTests/svg/dom/SVGTransformList-createSVGTransformFromMatrix-argument-type.html |
diff --git a/third_party/WebKit/LayoutTests/svg/dom/SVGTransformList-createSVGTransformFromMatrix-argument-type.html b/third_party/WebKit/LayoutTests/svg/dom/SVGTransformList-createSVGTransformFromMatrix-argument-type.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..92a813f8fee381cf2e4fabe624a950e44e3d5707 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/svg/dom/SVGTransformList-createSVGTransformFromMatrix-argument-type.html |
@@ -0,0 +1,23 @@ |
+<!DOCTYPE HTML> |
+<title>SVGTransformList, createSVGTransformFromMatrix argument type</title> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script> |
+test(function() { |
+ // This test checks the SVGTransformList.createSVGTransformFromMatrix argument type. |
+ |
+ var svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg"); |
+ var rectElement = document.createElementNS("http://www.w3.org/2000/svg", "rect"); |
+ var transform = rectElement.transform.baseVal; |
+ |
+ // Check passing invalid arguments to 'createSVGTransformFromMatrix'. |
+ assert_throws(new TypeError(), function() { transform.createSVGTransformFromMatrix(); }); |
+ assert_throws(new TypeError(), function() { transform.createSVGTransformFromMatrix(svgElement.createSVGTransform()); }); |
+ assert_throws(new TypeError(), function() { transform.createSVGTransformFromMatrix(svgElement); }); |
+ assert_throws(new TypeError(), function() { transform.createSVGTransformFromMatrix('aString'); }); |
+ assert_throws(new TypeError(), function() { transform.createSVGTransformFromMatrix(1); }); |
+ assert_throws(new TypeError(), function() { transform.createSVGTransformFromMatrix(true); }); |
+ assert_throws(new TypeError(), function() { transform.createSVGTransformFromMatrix(undefined); }); |
+ assert_throws(new TypeError(), function() { transform.createSVGTransformFromMatrix(null); }); |
+}); |
+</script> |