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

Unified Diff: LayoutTests/svg/dom/method-argument-typechecks.html

Issue 231143002: Iron out some kinks in SVG IDL files (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add tests; Drop feMorphology change. Created 6 years, 8 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: LayoutTests/svg/dom/method-argument-typechecks.html
diff --git a/LayoutTests/svg/dom/method-argument-typechecks.html b/LayoutTests/svg/dom/method-argument-typechecks.html
new file mode 100644
index 0000000000000000000000000000000000000000..0d1c109fc483d66dfc0cb4c1415cd7d3d6ea3c0f
--- /dev/null
+++ b/LayoutTests/svg/dom/method-argument-typechecks.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<svg>
+ <feDropShadow id=dropshadow></feDropShadow>
+ <feGaussianBlur id=gaussian></feGaussianBlur>
+ <animate></animate>
+</svg>
+<script>
+description('Check that invalid values of arguments throw TypeError.');
+
+var dropShadow = document.getElementById('dropshadow');
+var gaussian = document.getElementById('gaussian');
+var animateElm = document.querySelector('animate');
+
+debug('SVGAnimationElement');
+
+debug('');
+debug('beginElementAt(float offset)');
+shouldNotThrow('animateElm.beginElementAt(0)');
+shouldThrow('animateElm.beginElementAt(NaN)');
+shouldThrow('animateElm.beginElementAt(Infinity)');
+
+debug('');
+debug('endElementAt(float offset)');
+shouldNotThrow('animateElm.endElementAt(0)');
+shouldThrow('animateElm.endElementAt(NaN)');
+shouldThrow('animateElm.endElementAt(Infinity)');
+
+debug('');
+debug('');
+debug('SVGFEDropShadowElement');
+
+debug('');
+debug('setStdDeviation(float stdDeviationX, float stdDeviationY)');
+shouldNotThrow('dropShadow.setStdDeviation(0, 0)');
+shouldThrow('dropShadow.setStdDeviation(NaN, NaN)');
+shouldThrow('dropShadow.setStdDeviation(Infinity, Infinity)');
+
+debug('');
+debug('');
+debug('SVGFEGaussianBlurElement');
+
+debug('');
+debug('setStdDeviation(float stdDeviationX, float stdDeviationY)');
+shouldNotThrow('gaussian.setStdDeviation(0, 0)');
+shouldThrow('gaussian.setStdDeviation(NaN, NaN)');
+shouldThrow('gaussian.setStdDeviation(Infinity, Infinity)');
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698