blob: 90197ecf08693639d009c41cb6bbd97c8e9c2b35 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description("This test checks the SVGAnimatedBoolean API - utilizing the preserveAlpha property of SVGFEConvolveMatrixElement");
var feConvolveMatrixElement = document.createElementNS("http://www.w3.org/2000/svg", "feConvolveMatrix");
debug("");
debug("Check initial preserveAlpha value");
shouldBe("feConvolveMatrixElement.preserveAlpha.baseVal", "false");
debug("");
debug("Set value to true");
shouldBe("feConvolveMatrixElement.preserveAlpha.baseVal = true", "true");
debug("");
debug("Caching baseVal in local variable");
var baseVal = feConvolveMatrixElement.preserveAlpha.baseVal;
shouldBe("baseVal", "true");
debug("");
debug("Modify local baseVal variable to true");
shouldBeFalse("baseVal = false");
debug("");
debug("Assure that feConvolveMatrixElement.preserveAlpha has not been changed, but the local baseVal variable");
shouldBe("baseVal", "false");
shouldBe("feConvolveMatrixElement.preserveAlpha.baseVal", "true");
debug("");
debug("Check assigning values of various types");
// ECMA-262, 9.2, "ToBoolean"
shouldBe("feConvolveMatrixElement.preserveAlpha.baseVal = feConvolveMatrixElement.preserveAlpha", "feConvolveMatrixElement.preserveAlpha");
shouldBe("feConvolveMatrixElement.preserveAlpha.baseVal", "true");
shouldBeNull("feConvolveMatrixElement.preserveAlpha.baseVal = null");
shouldBe("feConvolveMatrixElement.preserveAlpha.baseVal", "false");
shouldBe("feConvolveMatrixElement.preserveAlpha.baseVal = 'aString'", "'aString'");
shouldBe("feConvolveMatrixElement.preserveAlpha.baseVal", "true");
feConvolveMatrixElement.preserveAlpha.baseVal = false;
shouldBe("feConvolveMatrixElement.preserveAlpha.baseVal = feConvolveMatrixElement", "feConvolveMatrixElement");
shouldBe("feConvolveMatrixElement.preserveAlpha.baseVal", "true");
successfullyParsed = true;
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>