From fd04647b1bfbdc606dd3d8893a537f0e93fe246a Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Mon, 13 May 2013 22:35:27 -0400 Subject: [PATCH] Test addition/removal of fullpage class on viewer element --- test/basic.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/basic.js b/test/basic.js index ff302670..e3f41f67 100644 --- a/test/basic.js +++ b/test/basic.js @@ -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() {