From f716d47e546034d6adaf910fd62b0a6dd203caf7 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 18 Sep 2015 18:57:48 +0800 Subject: [PATCH] spec: Make the will-navigate test run faster --- spec/api-browser-window-spec.coffee | 10 +++++----- spec/fixtures/pages/will-navigate.html | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/api-browser-window-spec.coffee b/spec/api-browser-window-spec.coffee index 846b8bdbc9f0..bb4d782e7ffb 100644 --- a/spec/api-browser-window-spec.coffee +++ b/spec/api-browser-window-spec.coffee @@ -295,14 +295,14 @@ describe 'browser-window module', -> w.minimize() describe 'will-navigate event', -> - return if isCI and process.platform is 'darwin' + @timeout 10000 it 'emits when user starts a navigation', (done) -> - @timeout 10000 - w.webContents.on 'will-navigate', (event, url) -> + url = "file://#{fixtures}/pages/will-navigate.html" + w.webContents.on 'will-navigate', (event, u) -> event.preventDefault() - assert.equal url, 'https://www.github.com/' + assert.equal u, url done() - w.loadUrl "file://#{fixtures}/pages/will-navigate.html" + w.loadUrl url describe 'beginFrameSubscription method', -> it 'subscribes frame updates', (done) -> diff --git a/spec/fixtures/pages/will-navigate.html b/spec/fixtures/pages/will-navigate.html index bd2ebdc1cb43..8d0c9b779e2d 100644 --- a/spec/fixtures/pages/will-navigate.html +++ b/spec/fixtures/pages/will-navigate.html @@ -1,7 +1,7 @@