Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/svg/animations/add-after-load-use-counter.html |
| diff --git a/third_party/WebKit/LayoutTests/svg/animations/add-after-load-use-counter.html b/third_party/WebKit/LayoutTests/svg/animations/add-after-load-use-counter.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6876cd8d65984daa3737351dcc88d93cc152ab62 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/svg/animations/add-after-load-use-counter.html |
| @@ -0,0 +1,30 @@ |
| +<!DOCTYPE html> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<svg width="400" height="400"> |
| + <rect id="target" x="10" y="110" width="80" height="80"> |
| + <set attributeType="XML" attributeName="x" to="210" /> |
| + </rect> |
| +</svg> |
| +<script> |
| +'use strict'; |
| + |
| +// From UseCounter.h |
| +var SVGInsertAnimationValue = 1442; |
|
Mike Lawther (Google)
2016/07/13 07:30:54
nit: I'd give this the same name as from the .h fi
suzyh_UTC10 (ex-contributor)
2016/07/13 23:08:07
Good call, done.
|
| + |
| +var testHandle = async_test("SMIL element inserted after load is counted"); |
| + |
| +window.onload = function() { |
| + testHandle.step(function() { |
| + var animation = document.createElementNS("http://www.w3.org/2000/svg", "set"); |
| + animation.setAttribute("attributeType", "XML"); |
| + animation.setAttribute("attributeName", "y"); |
| + animation.setAttribute("value", "310"); |
| + assert_false(internals.isUseCounted(document, SVGInsertAnimationValue)); |
| + target.appendChild(animation); |
| + assert_true(internals.isUseCounted(document, SVGInsertAnimationValue)); |
| + }); |
| + testHandle.done(); |
| +}; |
| + |
| +</script> |