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="10" width="80" height="80" /> | |
| 6 </svg> | |
| 7 <script> | |
| 8 'use strict'; | |
| 9 | |
| 10 // From UseCounter.h | |
| 11 var SVGEventValue = 1440; | |
| 12 var SVGSyncbaseValue = 1441; | |
|
Mike Lawther (Google)
2016/07/13 07:30:54
nit: consider using the same names as the enum fro
suzyh_UTC10 (ex-contributor)
2016/07/13 23:08:07
Ditto.
| |
| 13 | |
| 14 test(() => { | |
| 15 var target = document.getElementById('target'); | |
| 16 var animation = document.createElementNS("http://www.w3.org/2000/svg", "anim ate"); | |
| 17 animation.setAttribute("begin", "5s"); | |
| 18 target.appendChild(animation); | |
| 19 assert_false(internals.isUseCounted(document, SVGEventValue)); | |
| 20 assert_false(internals.isUseCounted(document, SVGSyncbaseValue)); | |
| 21 }, 'begin using time is not counted as event or syncbase value.'); | |
| 22 | |
| 23 test(() => { | |
| 24 var target = document.getElementById('target'); | |
| 25 assert_false(internals.isUseCounted(document, SVGEventValue)); | |
| 26 var animation = document.createElementNS("http://www.w3.org/2000/svg", "anim ate"); | |
| 27 animation.setAttribute("begin", "target.click"); | |
| 28 target.appendChild(animation); | |
| 29 assert_true(internals.isUseCounted(document, SVGEventValue)); | |
| 30 }, 'begin using event-value is use counted.'); | |
| 31 | |
| 32 test(() => { | |
| 33 var target = document.getElementById('target'); | |
| 34 assert_false(internals.isUseCounted(document, SVGSyncbaseValue)); | |
| 35 var animation = document.createElementNS("http://www.w3.org/2000/svg", "anim ate"); | |
| 36 animation.setAttribute("begin", "anim.end"); | |
| 37 target.appendChild(animation); | |
| 38 assert_true(internals.isUseCounted(document, SVGSyncbaseValue)); | |
| 39 }, 'begin using syncbase-value is use counted.'); | |
| 40 | |
| 41 </script> | |
| OLD | NEW |