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

Unified Diff: third_party/WebKit/LayoutTests/svg/dom/SVGTransformList-createSVGTransformFromMatrix-argument-type.html

Issue 2362653002: Convert LayoutTests/svg/dom/SVGTransform*.html js-tests.js to testharness.js based tests (Closed)
Patch Set: Align with review comments Created 4 years, 3 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
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>

Powered by Google App Engine
This is Rietveld 408576698