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

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

Issue 779963002: Add the 'lighter' composite operation to feComposite. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years 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 SVGFEComp ositeElement"); 1 description("This test checks the use of SVGAnimatedEnumeration within SVGFEComp ositeElement");
2 2
3 var feCompositeElement = document.createElementNS("http://www.w3.org/2000/svg", "feComposite"); 3 var feCompositeElement = document.createElementNS("http://www.w3.org/2000/svg", "feComposite");
4 feCompositeElement.setAttribute("operator", "over"); 4 feCompositeElement.setAttribute("operator", "over");
5 5
6 debug(""); 6 debug("");
7 debug("Check initial 'operator' value"); 7 debug("Check initial 'operator' value");
8 shouldBeEqualToString("feCompositeElement.operator.toString()", "[object SVGAnim atedEnumeration]"); 8 shouldBeEqualToString("feCompositeElement.operator.toString()", "[object SVGAnim atedEnumeration]");
9 shouldBeEqualToString("typeof(feCompositeElement.operator.baseVal)", "number"); 9 shouldBeEqualToString("typeof(feCompositeElement.operator.baseVal)", "number");
10 shouldBe("feCompositeElement.operator.baseVal", "SVGFECompositeElement.SVG_FECOM POSITE_OPERATOR_OVER"); 10 shouldBe("feCompositeElement.operator.baseVal", "SVGFECompositeElement.SVG_FECOM POSITE_OPERATOR_OVER");
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 shouldThrow("feCompositeElement.operator.baseVal = 0"); 52 shouldThrow("feCompositeElement.operator.baseVal = 0");
53 shouldBe("feCompositeElement.operator.baseVal", "SVGFECompositeElement.SVG_FECOM POSITE_OPERATOR_ARITHMETIC"); 53 shouldBe("feCompositeElement.operator.baseVal", "SVGFECompositeElement.SVG_FECOM POSITE_OPERATOR_ARITHMETIC");
54 shouldBeEqualToString("feCompositeElement.getAttribute('operator')", "arithmetic "); 54 shouldBeEqualToString("feCompositeElement.getAttribute('operator')", "arithmetic ");
55 55
56 debug(""); 56 debug("");
57 debug("Switch to 'over'"); 57 debug("Switch to 'over'");
58 shouldBe("feCompositeElement.operator.baseVal = SVGFECompositeElement.SVG_FECOMP OSITE_OPERATOR_OVER", "SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OVER"); 58 shouldBe("feCompositeElement.operator.baseVal = SVGFECompositeElement.SVG_FECOMP OSITE_OPERATOR_OVER", "SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OVER");
59 shouldBe("feCompositeElement.operator.baseVal", "SVGFECompositeElement.SVG_FECOM POSITE_OPERATOR_OVER"); 59 shouldBe("feCompositeElement.operator.baseVal", "SVGFECompositeElement.SVG_FECOM POSITE_OPERATOR_OVER");
60 shouldBeEqualToString("feCompositeElement.getAttribute('operator')", "over"); 60 shouldBeEqualToString("feCompositeElement.getAttribute('operator')", "over");
61 61
62 debug("");
63 debug("Switch to 'lighter'");
64 shouldBeUndefined("SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_LIGHTER");
65 feCompositeElement.setAttribute("operator", "lighter");
66 shouldBe("feCompositeElement.operator.baseVal", "SVGFECompositeElement.SVG_FECOM POSITE_OPERATOR_UNKNOWN");
67
62 successfullyParsed = true; 68 successfullyParsed = true;
OLDNEW
« no previous file with comments | « LayoutTests/svg/dom/SVGAnimatedEnumeration-SVGFECompositeElement-expected.txt ('k') | LayoutTests/svg/filters/feComposite.svg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698