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 </rect> | |
| 7 </svg> | |
| 8 <script> | |
| 9 'use strict'; | |
| 10 | |
| 11 // From UseCounter.h | |
| 12 var SVGSMILAnimationAppliedEffect = 1458; | |
| 13 | |
| 14 var testHandle = async_test("Count when SMIL animation has rendered a frame"); | |
|
fs
2016/07/21 10:17:32
Maybe s/rendered a frame/been applied/ to more clo
suzyh_UTC10 (ex-contributor)
2016/07/25 03:16:00
Done.
| |
| 15 | |
| 16 requestAnimationFrame(function() { | |
|
fs
2016/07/21 10:17:32
Optionally I think you could pause the timeline (S
suzyh_UTC10 (ex-contributor)
2016/07/25 03:15:59
I tried the following test, but it crashed in debu
fs
2016/07/25 14:50:41
I've hard time seeing that it wouldn't be a bug. C
| |
| 17 requestAnimationFrame(function() { | |
| 18 testHandle.step(function() { | |
| 19 var animation = document.createElementNS("http://www.w3.org/2000/svg ", "animate"); | |
| 20 animation.setAttribute("attributeType", "XML"); | |
| 21 animation.setAttribute("attributeName", "y"); | |
| 22 animation.setAttribute("from", "210"); | |
| 23 animation.setAttribute("to", "310"); | |
| 24 animation.setAttribute("begin", "-5"); | |
| 25 animation.setAttribute("dur", "20"); | |
| 26 target.appendChild(animation); | |
| 27 assert_false(internals.isUseCounted(document, SVGSMILAnimationApplie dEffect)); | |
| 28 }); | |
| 29 | |
| 30 requestAnimationFrame(function() { | |
| 31 requestAnimationFrame(function() { | |
| 32 testHandle.step(function() { | |
| 33 assert_true(internals.isUseCounted(document, SVGSMILAnimatio nAppliedEffect)); | |
| 34 testHandle.done(); | |
| 35 }); | |
| 36 }); | |
| 37 }); | |
| 38 }); | |
| 39 }); | |
| 40 | |
| 41 </script> | |
| OLD | NEW |