From: Cheng Zhao Date: Thu, 18 Jun 2015 08:31:55 +0000 (+0800) Subject: Don't rely on real focus/blur events in tests X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0120be5b8c3d3a9cbe2ae0a06c8f318c35a32c2b;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Don't rely on real focus/blur events in tests It is super unreliable. --- diff --git a/spec/api-app-spec.coffee b/spec/api-app-spec.coffee index 44de389..5c6591c 100644 --- a/spec/api-app-spec.coffee +++ b/spec/api-app-spec.coffee @@ -1,6 +1,6 @@ assert = require 'assert' -app = require('remote').require 'app' remote = require 'remote' +app = remote.require 'app' BrowserWindow = remote.require 'browser-window' describe 'app module', -> @@ -40,5 +40,5 @@ describe 'app module', -> done() app.once 'browser-window-focus', (e, window) -> assert.equal w.id, window.id - w.hide() - w.show() + w.emit 'blur' + w.emit 'focus'