[Build] Fix FullscreenAction spec

...to reflect acquisition of screenfull dependency via
AMD
This commit is contained in:
Victor Woeltjen 2016-03-04 11:46:15 -08:00
parent 65095d18f2
commit 4f85616632

View File

@ -24,26 +24,25 @@
* MCTRepresentationSpec. Created by vwoeltje on 11/6/14. * MCTRepresentationSpec. Created by vwoeltje on 11/6/14.
*/ */
define( define(
["../../src/windowing/FullscreenAction"], ["../../src/windowing/FullscreenAction", "screenfull"],
function (FullscreenAction) { function (FullscreenAction, screenfull) {
describe("The fullscreen action", function () { describe("The fullscreen action", function () {
var action, var action,
oldScreenfull; oldToggle;
beforeEach(function () { beforeEach(function () {
// Screenfull is not shimmed or injected, so // Screenfull is not shimmed or injected, so
// we need to spy on it in the global scope. // we need to spy on it in the global scope.
oldScreenfull = window.screenfull; oldToggle = screenfull.toggle;
window.screenfull = {}; screenfull.toggle = jasmine.createSpy("toggle");
window.screenfull.toggle = jasmine.createSpy("toggle");
action = new FullscreenAction({}); action = new FullscreenAction({});
}); });
afterEach(function () { afterEach(function () {
window.screenfull = oldScreenfull; screenfull.toggle = oldToggle;
}); });
it("toggles fullscreen mode when performed", function () { it("toggles fullscreen mode when performed", function () {