mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 22:56:11 +03:00
Testing source and timer management in basic test
This commit is contained in:
parent
862b560cb4
commit
9a28793e64
@ -24,6 +24,8 @@
|
||||
equal(eventSender, viewer, 'Sender of open event was viewer');
|
||||
ok(eventData, 'Handler also received event data');
|
||||
ok(viewer.viewport, 'Viewport exists');
|
||||
ok(viewer.source, 'source exists');
|
||||
ok(viewer._updateRequestId, 'timer is on');
|
||||
start();
|
||||
};
|
||||
|
||||
@ -122,9 +124,14 @@
|
||||
asyncTest('Close', function() {
|
||||
var closeHandler = function() {
|
||||
viewer.removeHandler('close', closeHandler);
|
||||
ok(!viewer.source, 'no source');
|
||||
$('#example').empty();
|
||||
ok(true, 'Close event was sent');
|
||||
start();
|
||||
ok(!viewer._updateRequestId, 'timer is off');
|
||||
setTimeout(function() {
|
||||
ok(!viewer._updateRequestId, 'timer is still off');
|
||||
start();
|
||||
}, 100);
|
||||
};
|
||||
|
||||
viewer.addHandler('close', closeHandler);
|
||||
|
Loading…
Reference in New Issue
Block a user