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

Side by Side Diff: LayoutTests/svg/dom/script-tests/SVGAnimatedEnumeration-SVGFEBlendElement.js

Issue 447193002: Add support for additional blend modes to SVGFEBlendElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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
1 description("This test checks the use of SVGAnimatedEnumeration within SVGFEBlen dElement"); 1 description("This test checks the use of SVGAnimatedEnumeration within SVGFEBlen dElement");
2 2
3 var feBlendElement = document.createElementNS("http://www.w3.org/2000/svg", "feB lend"); 3 var feBlendElement = document.createElementNS("http://www.w3.org/2000/svg", "feB lend");
4 feBlendElement.setAttribute("mode", "normal"); 4 feBlendElement.setAttribute("mode", "normal");
5 5
6 debug(""); 6 debug("");
7 debug("Check initial 'mode' value"); 7 debug("Check initial 'mode' value");
8 shouldBeEqualToString("feBlendElement.mode.toString()", "[object SVGAnimatedEnum eration]"); 8 shouldBeEqualToString("feBlendElement.mode.toString()", "[object SVGAnimatedEnum eration]");
9 shouldBeEqualToString("typeof(feBlendElement.mode.baseVal)", "number"); 9 shouldBeEqualToString("typeof(feBlendElement.mode.baseVal)", "number");
10 shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_NORM AL"); 10 shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_NORM AL");
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 shouldThrow("feBlendElement.mode.baseVal = 0"); 46 shouldThrow("feBlendElement.mode.baseVal = 0");
47 shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_LIGH TEN"); 47 shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_LIGH TEN");
48 shouldBeEqualToString("feBlendElement.getAttribute('mode')", "lighten"); 48 shouldBeEqualToString("feBlendElement.getAttribute('mode')", "lighten");
49 49
50 debug(""); 50 debug("");
51 debug("Switch to 'normal'"); 51 debug("Switch to 'normal'");
52 shouldBe("feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_NORMA L", "SVGFEBlendElement.SVG_FEBLEND_MODE_NORMAL"); 52 shouldBe("feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_NORMA L", "SVGFEBlendElement.SVG_FEBLEND_MODE_NORMAL");
53 shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_NORM AL"); 53 shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_NORM AL");
54 shouldBeEqualToString("feBlendElement.getAttribute('mode')", "normal"); 54 shouldBeEqualToString("feBlendElement.getAttribute('mode')", "normal");
55 55
56 debug("");
57 debug("baseVal access when mode is set to a value not in SVGFEBlendElement.SVG_F EBLEND_MODE_*.");
58 feBlendElement.setAttribute("mode", "color-dodge");
59 shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_UNKN OWN");
60 shouldThrow("feBlendElement.mode.baseVal = 13");
61 shouldBeEqualToString("feBlendElement.getAttribute('mode')", "color-dodge");
62
56 successfullyParsed = true; 63 successfullyParsed = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698