From: Cheng Zhao Date: Mon, 2 Sep 2013 08:47:53 +0000 (+0800) Subject: :lipstick: fix the window specs. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=893309aa8aab2f60c759088dd21eac10cad9352a;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git :lipstick: fix the window specs. --- diff --git a/spec/api/window.coffee b/spec/api/window.coffee index 976c577..4226817 100644 --- a/spec/api/window.coffee +++ b/spec/api/window.coffee @@ -44,8 +44,10 @@ describe 'window module', -> it 'should emit beforeunload handler', (done) -> w = new BrowserWindow(show: false) - w.on 'onbeforeunload', done - w.loadUrl 'file://' + path.join(fixtures, 'api', 'close-beforeunload-true.html') + w.on 'onbeforeunload', -> + w.destroy() + done() + w.loadUrl 'file://' + path.join(fixtures, 'api', 'close-beforeunload-false.html') describe 'BrowserWindow.loadUrl(url)', -> it 'should emit loading-state-changed event', (done) -> @@ -84,4 +86,4 @@ describe 'window module', -> w.on 'onbeforeunload', -> w.destroy() done() - w.loadUrl 'file://' + path.join(fixtures, 'api', 'close-beforeunload-false.html') + w.loadUrl 'file://' + path.join(fixtures, 'api', 'close-beforeunload-string.html')