Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <script src="../../resources/testharness.js"></script> | |
| 3 <script src="../../resources/testharnessreport.js"></script> | |
| 4 <svg width="400" height="400"> | |
| 5 <rect id="target" x="10" y="110" width="80" height="80"> | |
| 6 <set attributeType="XML" attributeName="x" to="210" /> | |
| 7 </rect> | |
| 8 </svg> | |
| 9 <script> | |
| 10 'use strict'; | |
| 11 | |
| 12 // From UseCounter.h | |
| 13 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.
| |
| 14 | |
| 15 var testHandle = async_test("SMIL element inserted after load is counted"); | |
| 16 | |
| 17 window.onload = function() { | |
| 18 testHandle.step(function() { | |
| 19 var animation = document.createElementNS("http://www.w3.org/2000/svg", " set"); | |
| 20 animation.setAttribute("attributeType", "XML"); | |
| 21 animation.setAttribute("attributeName", "y"); | |
| 22 animation.setAttribute("value", "310"); | |
| 23 assert_false(internals.isUseCounted(document, SVGInsertAnimationValue)); | |
| 24 target.appendChild(animation); | |
| 25 assert_true(internals.isUseCounted(document, SVGInsertAnimationValue)); | |
| 26 }); | |
| 27 testHandle.done(); | |
| 28 }; | |
| 29 | |
| 30 </script> | |
| OLD | NEW |