From: Cheng Zhao Date: Thu, 28 May 2015 05:45:16 +0000 (+0800) Subject: Fix running spec on Windows X-Git-Tag: v0.27.1~5 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=ebbb974aca1771d4b519bba354239c2005683e03;p=electron.git Fix running spec on Windows --- diff --git a/spec/api-browser-window-spec.coffee b/spec/api-browser-window-spec.coffee index fb5c26ab..ea3e06c9 100644 --- a/spec/api-browser-window-spec.coffee +++ b/spec/api-browser-window-spec.coffee @@ -91,8 +91,8 @@ describe 'browser-window module', -> describe 'BrowserWindow.setSize(width, height)', -> it 'sets the window size', (done) -> - size = [20, 400] - w.on 'resize', -> + size = [300, 400] + w.once 'resize', -> newSize = w.getSize() assert.equal newSize[0], size[0] assert.equal newSize[1], size[1] @@ -102,7 +102,7 @@ describe 'browser-window module', -> describe 'BrowserWindow.setPosition(x, y)', -> it 'sets the window position', (done) -> pos = [10, 10] - w.on 'move', -> + w.once 'move', -> newPos = w.getPosition() assert.equal newPos[0], pos[0] assert.equal newPos[1], pos[1]