Event "close" => "closed", fix #2149
authorCheng Zhao <zcbenz@gmail.com>
Fri, 10 Jul 2015 02:38:15 +0000 (10:38 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 10 Jul 2015 02:38:15 +0000 (10:38 +0800)
atom/browser/api/atom_api_web_contents.cc
spec/webview-spec.coffee

index e2d1b31..8db86f3 100644 (file)
@@ -250,7 +250,7 @@ void WebContents::MoveContents(content::WebContents* source,
 }
 
 void WebContents::CloseContents(content::WebContents* source) {
-  Emit("closed");
+  Emit("close");
   if (type_ == BROWSER_WINDOW)
     owner_window()->CloseContents(source);
 }
index 451276a..704bdd7 100644 (file)
@@ -192,7 +192,7 @@ describe '<webview> tag', ->
       document.body.appendChild webview
 
   describe 'close event', ->
-    it 'should fire when interior page calls window.close', ->
+    it 'should fire when interior page calls window.close', (done) ->
       webview.addEventListener 'close', ->
         done()