Browse Source

Merge pull request #7429 from electron/webview-max-listeners

Ensure webviews get reset after spec finishes
Kevin Sawicki 8 years ago
parent
commit
fb41474555
1 changed files with 3 additions and 2 deletions
  1. 3 2
      spec/webview-spec.js

+ 3 - 2
spec/webview-spec.js

@@ -17,9 +17,10 @@ describe('<webview> tag', function () {
   })
 
   afterEach(function () {
-    if (document.body.contains(webview)) {
-      document.body.removeChild(webview)
+    if (!document.body.contains(webview)) {
+      document.body.appendChild(webview)
     }
+    webview.remove()
     if (w) {
       w.destroy()
       w = null