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/SVGAnimatedRect.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
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/dom/script-tests/SVGAnimatedPreserveAspectRatio.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 description("This test checks the SVGAnimatedRect API - utilizing the viewBox pr operty of SVGSVGElement");
2
3 var svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
4
5 debug("");
6 debug("Check initial viewBox value");
7 shouldBeEqualToString("svgElement.viewBox.toString()", "[object SVGAnimatedRect] ");
8 shouldBeEqualToString("svgElement.viewBox.baseVal.toString()", "[object SVGRect] ");
9 shouldBe("svgElement.viewBox.baseVal.x", "0");
10
11 debug("");
12 debug("Check that rects are dynamic, caching value in a local variable and modif ying it, should take effect");
13 var numRef = svgElement.viewBox.baseVal;
14 numRef.x = 100;
15 shouldBe("numRef.x", "100");
16 shouldBe("svgElement.viewBox.baseVal.x", "100");
17
18 debug("");
19 debug("Check that assigning to baseVal has no effect, as no setter is defined");
20 shouldBe("svgElement.viewBox.baseVal = -1", "-1");
21 shouldBeEqualToString("svgElement.viewBox.baseVal = 'aString'", "aString");
22 shouldBe("svgElement.viewBox.baseVal = svgElement", "svgElement");
23
24 debug("");
25 debug("Check that the viewBox x remained 100, and the baseVal type has not been changed");
26 shouldBeEqualToString("svgElement.viewBox.baseVal.toString()", "[object SVGRect] ");
27 shouldBe("svgElement.viewBox.baseVal.x", "100");
28
29 successfullyParsed = true;
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/dom/script-tests/SVGAnimatedPreserveAspectRatio.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698