Test addition/removal of fullpage class on viewer element

This commit is contained in:
Benjamin Gilbert 2013-05-13 22:35:27 -04:00
parent 31d4cc13b7
commit fd04647b1b

View File

@ -102,6 +102,23 @@
Util.simulateViewerClick(viewer, 0.25, 0.25);
});
// ----------
test('Fullscreen', function() {
ok(!viewer.isFullPage(), 'Started out not fullpage');
ok(!$(viewer.element).hasClass('fullpage'),
'No fullpage class on div');
viewer.setFullPage(true);
ok(viewer.isFullPage(), 'Enabled fullpage');
ok($(viewer.element).hasClass('fullpage'),
'Fullpage class added to div');
viewer.setFullPage(false);
ok(!viewer.isFullPage(), 'Disabled fullpage');
ok(!$(viewer.element).hasClass('fullpage'),
'Fullpage class removed from div');
});
// ----------
asyncTest('Close', function() {
var closeHandler = function() {