--- /dev/null
+<html>
+<link rel="icon" type="image/png" href="/favicon.png"/>
+<link rel="icon" type="image/png" href="http://test.com/favicon.png"/>
+<body>
+<script type="text/javascript" charset="utf-8">
+ window.close();
+</script>
+</body>
+</html>
webview.src = "file://#{fixtures}/pages/a.html"
document.body.appendChild webview
+ describe 'close event', ->
+ it 'should fire when interior page calls window.close', ->
+ webview.addEventListener 'close', ->
+ done()
+
+ webview.src = "file://#{fixtures}/pages/close.html"
+ document.body.appendChild webview
+
describe '<webview>.reload()', ->
it 'should emit beforeunload handler', (done) ->
listener = (e) ->
webview.removeEventListener 'ipc-message', listener
done()
webview.addEventListener 'ipc-message', listener
- webview.setAttribute 'nodeintegration', 'on'
+ webview.setAttribute 'nodeintegration', 'on'
webview.src = "file://#{fixtures}/pages/history.html"
document.body.appendChild webview