From: Kevin Sawicki Date: Tue, 24 Jan 2017 19:22:25 +0000 (-0800) Subject: Finish spec when full screen is left X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6bb331356e5b796d24a5afdfa5c11962f0be1d36;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Finish spec when full screen is left --- diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index 74807e4..5253d89 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -1441,20 +1441,31 @@ describe('BrowserWindow module', function () { w.destroy() w = new BrowserWindow() w.once('enter-full-screen', () => { + assert.equal(w.isFullScreen(), true) w.setFullScreen(false) + }) + w.once('leave-full-screen', () => { assert.equal(w.isFullScreen(), false) done() }) w.setFullScreen(true) - assert.equal(w.isFullScreen(), true) }) - it('should not be changed by setKiosk method', function () { + it('should not be changed by setKiosk method', function (done) { + w.destroy() + w = new BrowserWindow() + w.once('enter-full-screen', () => { + assert.equal(w.isFullScreen(), true) + w.setKiosk(true) + w.setKiosk(false) + assert.equal(w.isFullScreen(), true) + w.setFullScreen(false) + }) + w.once('leave-full-screen', () => { + assert.equal(w.isFullScreen(), false) + done() + }) w.setFullScreen(true) - assert.equal(w.isFullScreen(), true) - w.setKiosk(true) - w.setKiosk(false) - assert.equal(w.isFullScreen(), true) }) })