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

Unified Diff: LayoutTests/svg/dom/SVGSVGElement-currentScale-NaN-no-crash.html

Issue 910713002: Restrict floats over SVGSVGElement to finite values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update svg/animations/animate-setcurrenttime.html Created 5 years, 10 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/SVGSVGElement-currentScale-NaN-no-crash.html
diff --git a/LayoutTests/svg/dom/SVGSVGElement-currentScale-NaN-no-crash.html b/LayoutTests/svg/dom/SVGSVGElement-currentScale-NaN-no-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..8e9a22b93e14bbbca16ee7f416a959b763330c59
--- /dev/null
+++ b/LayoutTests/svg/dom/SVGSVGElement-currentScale-NaN-no-crash.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+</head>
+<body>
+<svg id="svg" xmlns="http://www.w3.org/2000/svg" width="200" height="200"></svg>
+<script>
+description("Setting .currentScale to a non-finite should throw.");
+
+self.jsTestIsAsync = true;
+
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+function runTest()
+{
+ svgElement = document.getElementById("svg");
+ shouldThrow("svgElement.currentScale = NaN");
+ shouldThrow("svgElement.currentScale = Infinity");
+ finishJSTest();
+}
+window.onload = runTest;
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698