Sha256: f0dfc13ce954cccd17b806f5f6e4e58f9238115f121537316d1057759a0e48a2

Contents?: true

Size: 615 Bytes

Versions: 22

Compression:

Stored size: 615 Bytes

Contents

<% content_for('final') do %>

<script>

Test.context("Timer.invalidate", {

  "invalidate immediately should never execute": function() {
    
    var fired = NO ;
    
    SC.runLoop.beginRunLoop() ;
    var start = SC.runLoop.get('startTime') ;
    var t = SC.Timer.schedule({
      target: this,
      action: function() { fired = YES ; },
      interval: 100
    });
    t.invalidate() ;
    SC.runLoop.endRunLoop() ;

    var checks = 10 ;
    wait(1500, function() {
      assertEqual(NO, fired) ;
    }) ;
  }
  
  // using invalidate on a repeating timer is tested in schedule().

});

</script>

<% end %>

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
sproutcore-0.9.11 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.10 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.12 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.13 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.14 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.15 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.18 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.17 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.19 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.16 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.2 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.22 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.23 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.21 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.20 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.3 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.5 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.4 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.8 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml
sproutcore-0.9.7 frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml