| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 #library('RequestAnimationFrameTest'); | |
| 6 #import('../../../../lib/unittest/unittest.dart'); | |
| 7 #import('../../../../lib/unittest/dom_config.dart'); | |
| 8 #import('dart:dom'); | |
| 9 | |
| 10 main() { | |
| 11 useDomConfiguration(); | |
| 12 | |
| 13 asyncTest('oneShot', 1, () { | |
| 14 var frame = window.requestAnimationFrame( | |
| 15 (timestamp) { callbackDone(); }); | |
| 16 }); | |
| 17 | |
| 18 asyncTest('twoShot', 1, () { | |
| 19 var frame = window.requestAnimationFrame( | |
| 20 (timestamp1) { | |
| 21 window.requestAnimationFrame( | |
| 22 (timestamp2) { | |
| 23 // Not monotonic on Safari and IE. | |
| 24 //Expect.isTrue(timestamp2 > timestamp1, 'timestamps ordered')
; | |
| 25 callbackDone(); | |
| 26 }); | |
| 27 }); | |
| 28 }); | |
| 29 } | |
| OLD | NEW |