From fbfae70803934c75e432876db014014a32c61507 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 21 Jul 2016 17:08:43 +0900 Subject: [PATCH] spec: Fix exception when refreshing test window --- spec/api-web-contents-spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/api-web-contents-spec.js b/spec/api-web-contents-spec.js index a9519de131aa..b9195702a324 100644 --- a/spec/api-web-contents-spec.js +++ b/spec/api-web-contents-spec.js @@ -63,12 +63,12 @@ describe('webContents module', function () { const specWebContents = remote.getCurrentWebContents() assert.equal(specWebContents.getId(), webContents.getFocusedWebContents().getId()) - specWebContents.on('devtools-opened', function () { + specWebContents.once('devtools-opened', function () { assert.equal(specWebContents.devToolsWebContents.getId(), webContents.getFocusedWebContents().getId()) specWebContents.closeDevTools() }) - specWebContents.on('devtools-closed', function () { + specWebContents.once('devtools-closed', function () { assert.equal(specWebContents.getId(), webContents.getFocusedWebContents().getId()) done() })