From: Kevin Sawicki Date: Thu, 3 Nov 2016 23:43:16 +0000 (-0700) Subject: Use window close helper instead of destroying for coverage X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=19a5d2ba2bc9886557098932ba9970bae0d74e02;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Use window close helper instead of destroying for coverage --- diff --git a/spec/webview-spec.js b/spec/webview-spec.js index 2c0b809..4fb9694 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -3,6 +3,7 @@ const path = require('path') const http = require('http') const url = require('url') const {app, session, getGuestWebContents, ipcMain, BrowserWindow} = require('electron').remote +const {closeWindow} = require('./window-helpers') describe(' tag', function () { this.timeout(20000) @@ -21,10 +22,7 @@ describe(' tag', function () { document.body.appendChild(webview) } webview.remove() - if (w) { - w.destroy() - w = null - } + return closeWindow(w).then(function () { w = null }) }) it('works without script tag in page', function (done) {