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

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

Issue 2713833002: Convert LayoutTests/svg/dom/SVGAnimated*.html js-tests.js to testharness.js based tests. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 description("This test checks the SVGAnimatedLength API - utilizing the width pr operty of SVGRectElement");
2
3 var rectElement = document.createElementNS("http://www.w3.org/2000/svg", "rect") ;
4
5 debug("");
6 debug("Check initial width value");
7 shouldBeEqualToString("rectElement.width.toString()", "[object SVGAnimatedLength ]");
8 shouldBeEqualToString("rectElement.width.baseVal.toString()", "[object SVGLength ]");
9 shouldBe("rectElement.width.baseVal.value", "0");
10
11 debug("");
12 debug("Check that lengths are dynamic, caching value in a local variable and mod ifying it, should take effect");
13 var numRef = rectElement.width.baseVal;
14 numRef.value = 100;
15 shouldBe("numRef.value", "100");
16 shouldBe("rectElement.width.baseVal.value", "100");
17
18 debug("");
19 debug("Check that assigning to baseVal has no effect, as no setter is defined");
20 shouldBe("rectElement.width.baseVal = -1", "-1");
21 shouldBeEqualToString("rectElement.width.baseVal = 'aString'", "aString");
22 shouldBe("rectElement.width.baseVal = rectElement", "rectElement");
23
24 debug("");
25 debug("Check that the width value remained 100, and the baseVal type has not bee n changed");
26 shouldBeEqualToString("rectElement.width.baseVal.toString()", "[object SVGLength ]");
27 shouldBe("rectElement.width.baseVal.value", "100");
28
29 successfullyParsed = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698