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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/dom/script-tests/SVGAnimatedInteger.js

Issue 2705293005: Convert LayoutTests/svg/dom/SVGAnimated*.html js-tests.js to testharness.js based tests. (Closed)
Patch Set: Align with review comments Created 3 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 description("This test checks the SVGAnimatedInteger API - utilizing the targetX property of SVGFEConvolveMatrix");
2
3 var feConvolveMatrix = document.createElementNS("http://www.w3.org/2000/svg", "f eConvolveMatrix");
4
5 debug("");
6 debug("Check initial targetX value");
7 shouldBeEqualToString("feConvolveMatrix.targetX.toString()", "[object SVGAnimate dInteger]");
8 shouldBeEqualToString("typeof(feConvolveMatrix.targetX.baseVal)", "number");
9 shouldBe("feConvolveMatrix.targetX.baseVal", "0");
10
11 debug("");
12 debug("Check that integers are static, caching value in a local variable and mod ifying it, should have no effect");
13 var numRef = feConvolveMatrix.targetX.baseVal;
14 numRef = 100;
15 shouldBe("numRef", "100");
16 shouldBe("feConvolveMatrix.targetX.baseVal", "0");
17
18 debug("");
19 debug("Check assigning various valid and invalid values");
20 shouldBe("feConvolveMatrix.targetX.baseVal = -1", "-1"); // Negative values are allowed from SVG DOM, but should lead to an error when rendering (disable the fi lter)
21 shouldBe("feConvolveMatrix.targetX.baseVal = 300", "300");
22 // ECMA-262, 9.5, "ToInt32"
23 shouldBe("feConvolveMatrix.targetX.baseVal = 'aString'", "'aString'");
24 shouldBe("feConvolveMatrix.targetX.baseVal", "0");
25 shouldBe("feConvolveMatrix.targetX.baseVal = feConvolveMatrix", "feConvolveMatri x");
26 shouldBe("feConvolveMatrix.targetX.baseVal", "0");
27 shouldBe("feConvolveMatrix.targetX.baseVal = 300", "300");
28
29 debug("");
30 debug("Check that the targetX value remained 300");
31 shouldBe("feConvolveMatrix.targetX.baseVal", "300");
32
33 successfullyParsed = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698