projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1943635
)
Don't rely on real focus/blur events in tests
author
Cheng Zhao
<zcbenz@gmail.com>
Thu, 18 Jun 2015 08:31:55 +0000
(16:31 +0800)
committer
Cheng Zhao
<zcbenz@gmail.com>
Thu, 18 Jun 2015 08:31:55 +0000
(16:31 +0800)
It is super unreliable.
spec/api-app-spec.coffee
patch
|
blob
|
history
diff --git
a/spec/api-app-spec.coffee
b/spec/api-app-spec.coffee
index
44de389
..
5c6591c
100644
(file)
--- 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'