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

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

Issue 2389803004: Convert LayoutTests/svg/dom/SVGAnimatedEnumeration*.html js-tests.js to testharness.js based tests. (Closed)
Patch Set: Align with review comments Created 4 years, 2 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/SVGAnimatedEnumeration-SVGFECompositeElement.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 use of SVGAnimatedEnumeration within SVGFEConv olveMatrixElement");
2
3 var feConvolveMatrixElement = document.createElementNS("http://www.w3.org/2000/s vg", "feConvolveMatrix");
4 feConvolveMatrixElement.setAttribute("edgeMode", "duplicate");
5
6 debug("");
7 debug("Check initial 'edgeMode' value");
8 shouldBeEqualToString("feConvolveMatrixElement.edgeMode.toString()", "[object SV GAnimatedEnumeration]");
9 shouldBeEqualToString("typeof(feConvolveMatrixElement.edgeMode.baseVal)", "numbe r");
10 shouldBe("feConvolveMatrixElement.edgeMode.baseVal", "SVGFEConvolveMatrixElement .SVG_EDGEMODE_DUPLICATE");
11
12 debug("");
13 debug("Switch to 'wrap'");
14 shouldBe("feConvolveMatrixElement.edgeMode.baseVal = SVGFEConvolveMatrixElement. SVG_EDGEMODE_WRAP", "SVGFEConvolveMatrixElement.SVG_EDGEMODE_WRAP");
15 shouldBe("feConvolveMatrixElement.edgeMode.baseVal", "SVGFEConvolveMatrixElement .SVG_EDGEMODE_WRAP");
16 shouldBeEqualToString("feConvolveMatrixElement.getAttribute('edgeMode')", "wrap" );
17
18 debug("");
19 debug("Switch to 'none'");
20 shouldBe("feConvolveMatrixElement.edgeMode.baseVal = SVGFEConvolveMatrixElement. SVG_EDGEMODE_NONE", "SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE");
21 shouldBe("feConvolveMatrixElement.edgeMode.baseVal", "SVGFEConvolveMatrixElement .SVG_EDGEMODE_NONE");
22 shouldBeEqualToString("feConvolveMatrixElement.getAttribute('edgeMode')", "none" );
23
24 debug("");
25 debug("Try setting invalid values");
26 shouldThrow("feConvolveMatrixElement.edgeMode.baseVal = 4");
27 shouldBe("feConvolveMatrixElement.edgeMode.baseVal", "SVGFEConvolveMatrixElement .SVG_EDGEMODE_NONE");
28 shouldBeEqualToString("feConvolveMatrixElement.getAttribute('edgeMode')", "none" );
29
30 shouldThrow("feConvolveMatrixElement.edgeMode.baseVal = -1");
31 shouldBe("feConvolveMatrixElement.edgeMode.baseVal", "SVGFEConvolveMatrixElement .SVG_EDGEMODE_NONE");
32 shouldBeEqualToString("feConvolveMatrixElement.getAttribute('edgeMode')", "none" );
33
34 shouldThrow("feConvolveMatrixElement.edgeMode.baseVal = 0");
35 shouldBe("feConvolveMatrixElement.edgeMode.baseVal", "SVGFEConvolveMatrixElement .SVG_EDGEMODE_NONE");
36 shouldBeEqualToString("feConvolveMatrixElement.getAttribute('edgeMode')", "none" );
37
38 debug("");
39 debug("Switch to 'duplicate'");
40 shouldBe("feConvolveMatrixElement.edgeMode.baseVal = SVGFEConvolveMatrixElement. SVG_EDGEMODE_DUPLICATE", "SVGFEConvolveMatrixElement.SVG_EDGEMODE_DUPLICATE");
41 shouldBe("feConvolveMatrixElement.edgeMode.baseVal", "SVGFEConvolveMatrixElement .SVG_EDGEMODE_DUPLICATE");
42 shouldBeEqualToString("feConvolveMatrixElement.getAttribute('edgeMode')", "dupli cate");
43
44 successfullyParsed = true;
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/dom/script-tests/SVGAnimatedEnumeration-SVGFECompositeElement.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698