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

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

Issue 2713833002: Convert LayoutTests/svg/dom/SVGAnimated*.html js-tests.js to testharness.js based tests. (Closed)
Patch Set: 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 SVGAnimatedLengthList API - utilizing the dx p roperty of SVGTextElement");
2
3 var textElement = document.createElementNS("http://www.w3.org/2000/svg", "text") ;
4 textElement.setAttribute("dx", "50");
5
6 debug("");
7 debug("Check initial dx value");
8 shouldBeEqualToString("textElement.dx.toString()", "[object SVGAnimatedLengthLis t]");
9 shouldBeEqualToString("textElement.dx.baseVal.toString()", "[object SVGLengthLis t]");
10 shouldBe("textElement.dx.baseVal.getItem(0).value", "50");
11
12 debug("");
13 debug("Check that length lists are dynamic, caching value in a local variable an d modifying it, should take effect");
14 var numRef = textElement.dx.baseVal;
15 numRef.getItem(0).value = 100;
16 shouldBe("numRef.getItem(0).value", "100");
17 shouldBe("textElement.dx.baseVal.getItem(0).value", "100");
18
19 debug("");
20 debug("Check that assigning to baseVal has no effect, as no setter is defined");
21 shouldBe("textElement.dx.baseVal = -1", "-1");
22 shouldBeEqualToString("textElement.dx.baseVal = 'aString'", "aString");
23 shouldBe("textElement.dx.baseVal = textElement", "textElement");
24
25 debug("");
26 debug("Check that the dx value remained 100, and the baseVal type has not been c hanged");
27 shouldBeEqualToString("textElement.dx.baseVal.toString()", "[object SVGLengthLis t]");
28 shouldBe("textElement.dx.baseVal.getItem(0).value", "100");
29
30 successfullyParsed = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698