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

Unified Diff: LayoutTests/svg/animations/animate-setcurrenttime.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
« no previous file with comments | « no previous file | LayoutTests/svg/animations/animate-setcurrenttime-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/animations/animate-setcurrenttime.html
diff --git a/LayoutTests/svg/animations/animate-setcurrenttime.html b/LayoutTests/svg/animations/animate-setcurrenttime.html
index 380f580abc8ffc2f4c6fd8aeb07ab427be84462b..780b807bb0d19a20ea6d5697f62e4cfb5dc7d868 100644
--- a/LayoutTests/svg/animations/animate-setcurrenttime.html
+++ b/LayoutTests/svg/animations/animate-setcurrenttime.html
@@ -5,8 +5,6 @@
</head>
<body>
- <h1>SVG 1.1 dynamic animation tests</h1>
-
<svg id='outer-svg' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve'>
<!-- sequential animations -->
<rect id='plain' x='0' y='0' width='32' height='32' fill='green'>
@@ -37,6 +35,9 @@
</svg>
<script>
+ description("SVG 1.1 dynamic animation tests");
+ self.jsTestIsAsync = true;
+
var svg = document.getElementById('outer-svg'),
nestedsvg = document.getElementById('nested-svg');
var tests, curIdx = 0;
@@ -46,22 +47,28 @@
var accumulating = document.getElementById('accumulating');
var repeating = document.getElementById('repeating');
var nested = document.getElementById('nested');
+ var test;
function runTest() {
- var test = tests[curIdx++];
+ test = tests[curIdx++];
+
+ if (test.throws && test.throws[0])
+ shouldThrow("svg.setCurrentTime(test.time[0])");
+ else
+ svg.setCurrentTime(test.time[0]);
- svg.setCurrentTime(test.time[0]);
- nestedsvg.setCurrentTime(test.time[1]);
+ if (test.throws && test.throws[1])
+ shouldThrow("nestedsvg.setCurrentTime(test.time[1])");
+ else
+ nestedsvg.setCurrentTime(test.time[1]);
setTimeout(function() {
for (var attr in test.values) {
shouldBe(attr + '.animVal.value', String(test.values[attr]));
}
- if (curIdx == tests.length) {
- if (window.testRunner)
- testRunner.notifyDone();
- }
+ if (curIdx == tests.length)
+ finishJSTest();
else
runTest();
}, 0);
@@ -73,7 +80,7 @@
tests = [
// Test invalid values.
- { time: ['tintin', NaN], values: { 'plain.x': 0, 'sequential.x': 0, 'accumulating.x': 0, 'repeating.x': 0, 'nested.x': 0 } },
+ { time: ['tintin', NaN], throws: [true, true], values: { 'plain.x': 0, 'sequential.x': 0, 'accumulating.x': 0, 'repeating.x': 0, 'nested.x': 0 } },
// Test out-of-range values.
{ time: [-1, -1], values: { 'plain.x': 0, 'sequential.x': 0, 'accumulating.x': 0, 'repeating.x': 0, 'nested.x': 0 } },
@@ -117,4 +124,3 @@
<div id="console"></div>
</body>
</html>
-
« no previous file with comments | « no previous file | LayoutTests/svg/animations/animate-setcurrenttime-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698