2 <div id=
"pass" style=
"visibility: hidden">PASS
</div>
3 <div id=
"fail" style=
"visibility: visible">FAIL
</div>
5 requestAnimationFrame(function() {
6 document
.getElementById('pass').animate([{visibility
: 'visible'}, {visibility
: 'visible'}], 10);
7 document
.getElementById('fail').animate([{visibility
: 'hidden'}, {visibility
: 'hidden'}], 10);
8 requestAnimationFrame(function() {
9 document
.documentElement
.textContent
= 'FAIL: Produced a second frame.';
12 if (window
.testRunner
) {
13 testRunner
.dumpAsText();
14 testRunner
.waitUntilDone();
15 setTimeout(function() {
16 if (window
.testRunner
) {
17 // Note that the test wont actually finish until the next frame is complete.
18 testRunner
.notifyDone();
22 document
.documentElement
.textContent
= 'FAIL: Test must be run under test harness.';