Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedBoolean.html |
| diff --git a/third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedBoolean.html b/third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedBoolean.html |
| index 179b16e1251c00006f5be4da928c6fe707741c4c..90e832c50a04cf13c6a7e5df2d7117613ceb2b3e 100644 |
| --- a/third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedBoolean.html |
| +++ b/third_party/WebKit/LayoutTests/svg/dom/SVGAnimatedBoolean.html |
| @@ -1,11 +1,46 @@ |
| -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| -<html> |
| -<head> |
| -<script src="../../resources/js-test.js"></script> |
| -</head> |
| -<body> |
| -<p id="description"></p> |
| -<div id="console"></div> |
| -<script src="script-tests/SVGAnimatedBoolean.js"></script> |
| -</body> |
| -</html> |
| +<!DOCTYPE HTML> |
| +<title>SVGAnimatedBoolean interface - utilizing the preserveAlpha property of SVGFEConvolveMatrixElement</title> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<script> |
| +test(function() { |
| + // This test checks the SVGAnimatedBoolean API - utilizing the preserveAlpha property of SVGFEConvolveMatrixElement. |
| + |
| + var convElement = document.createElementNS("http://www.w3.org/2000/svg", "feConvolveMatrix"); |
| + // Check initial preserveAlpha value. |
| + assert_false(convElement.preserveAlpha.baseVal); |
| + |
| + // Set value to true. |
| + convElement.preserveAlpha.baseVal = true; |
| + assert_true(convElement.preserveAlpha.baseVal); |
| + |
| + // Caching baseVal in local variable. |
| + var baseVal = convElement.preserveAlpha.baseVal; |
| + assert_true(baseVal); |
| + |
| + // Modify local baseVal variable to false. |
| + baseVal = false; |
| + |
| + // Assure that convElement.preserveAlpha has not been changed, but the local baseVal variable. |
| + assert_false(baseVal); |
| + assert_true(convElement.preserveAlpha.baseVal); |
| + |
| + // Check assigning values of various types. |
| + // ECMA-262, 9.2, "ToBoolean" |
| + convElement.preserveAlpha.baseVal = convElement.preserveAlpha; |
| + assert_equals(convElement.preserveAlpha.baseVal, convElement.preserveAlpha.baseVal); |
|
fs
2017/02/22 13:10:59
Drop this.
Shanmuga Pandi
2017/02/22 13:14:12
Done.
|
| + assert_true(convElement.preserveAlpha.baseVal); |
| + |
| + convElement.preserveAlpha.baseVal = null; |
| + assert_false(convElement.preserveAlpha.baseVal); |
| + |
| + convElement.preserveAlpha.baseVal = 'aString'; |
| + assert_true(convElement.preserveAlpha.baseVal); |
| + |
| + convElement.preserveAlpha.baseVal = false; |
| + assert_false(convElement.preserveAlpha.baseVal); |
| + |
| + convElement.preserveAlpha.baseVal = convElement; |
| + assert_true(convElement.preserveAlpha.baseVal); |
| +}); |
| +</script> |