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

Unified Diff: LayoutTests/svg/dom/method-argument-aritychecks.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
« no previous file with comments | « no previous file | LayoutTests/svg/dom/method-argument-aritychecks-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/dom/method-argument-aritychecks.html
diff --git a/LayoutTests/svg/dom/method-argument-aritychecks.html b/LayoutTests/svg/dom/method-argument-aritychecks.html
new file mode 100644
index 0000000000000000000000000000000000000000..726a205eb24e4aecdd04ba2a59edd940623228ba
--- /dev/null
+++ b/LayoutTests/svg/dom/method-argument-aritychecks.html
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<svg>
+ <feDropShadow id=dropshadow></feDropShadow>
+ <feGaussianBlur id=gaussian></feGaussianBlur>
+ <animate></animate>
+ <rect id="foo"></rect>
+ <use xlink:href="#foo"></use>
+</svg>
+<script>
+description('Check that incorrect number of arguments throw TypeError.');
+
+var dropShadow = document.getElementById('dropshadow');
+var gaussian = document.getElementById('gaussian');
+var rect = document.querySelector('rect');
+var animateElm = document.querySelector('animate');
+var useElm = document.querySelector('use');
+
+debug('SVGAnimationElement');
+
+debug('');
+debug('beginElementAt(float offset)');
+shouldThrow('animateElm.beginElementAt()');
+shouldNotThrow('animateElm.beginElementAt(0)');
+
+debug('');
+debug('endElementAt(float offset)');
+shouldThrow('animateElm.endElementAt()');
+shouldNotThrow('animateElm.endElementAt(0)');
+
+debug('');
+debug('');
+debug('SVGElementInstanceList');
+
+debug('');
+debug('item(unsigned long index)');
+shouldThrow('useElm.instanceRoot.childNodes.item()');
+shouldNotThrow('useElm.instanceRoot.childNodes.item(0)');
+
+debug('');
+debug('');
+debug('SVGFEDropShadowElement');
+
+debug('');
+debug('setStdDeviation(float stdDeviationX, float stdDeviationY)');
+shouldThrow('dropShadow.setStdDeviation()');
+shouldThrow('dropShadow.setStdDeviation(0)');
+shouldNotThrow('dropShadow.setStdDeviation(0, 0)');
+
+debug('');
+debug('');
+debug('SVGFEGaussianBlurElement');
+
+debug('');
+debug('setStdDeviation(float stdDeviationX, float stdDeviationY)');
+shouldThrow('gaussian.setStdDeviation()');
+shouldThrow('gaussian.setStdDeviation(0)');
+shouldNotThrow('gaussian.setStdDeviation(0, 0)');
+
+debug('');
+debug('');
+debug('SVGTests');
+
+debug('');
+debug('hasExtension(DOMString extension)');
+shouldThrow('rect.hasExtension()');
+shouldNotThrow('rect.hasExtension("foo")');
+
+</script>
« no previous file with comments | « no previous file | LayoutTests/svg/dom/method-argument-aritychecks-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698