From d942694695c2ae689dd31b15d9b99b92e38959ca Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 30 Sep 2016 08:54:19 -0700 Subject: [PATCH] openedWindow -> popupWindow --- spec/api-browser-window-spec.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index 5d23170edee1..6a839d91aa03 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -698,7 +698,7 @@ describe('browser-window module', function () { }) let htmlPath = path.join(fixtures, 'api', 'sandbox.html?window-open-external') const pageUrl = 'file://' + htmlPath - let openedWindow + let popupWindow w.loadURL(pageUrl) w.webContents.once('new-window', (e, url, frameName, disposition, options) => { assert.equal(url, 'http://www.google.com/#q=electron') @@ -712,15 +712,18 @@ describe('browser-window module', function () { ipcMain.once('answer', function (event, exceptionMessage) { assert(/Blocked a frame with origin/.test(exceptionMessage)) - // FIXME this opened window should be closed in sandbox.html - closeWindow(openedWindow).then(done) + // FIXME this popup window should be closed in sandbox.html + closeWindow(popupWindow).then(() => { + popupWindow = null + done() + }) }) w.webContents.send('child-loaded') }) }) app.once('browser-window-created', function (event, window) { - openedWindow = window + popupWindow = window }) })