michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: // For bug 773980, test that Components.utils.isDeadWrapper works as expected. michael@0: function test() { michael@0: waitForExplicitFinish(); michael@0: michael@0: let tab = gBrowser.addTab("http://example.com"); michael@0: let tabBrowser = tab.linkedBrowser; michael@0: michael@0: tabBrowser.addEventListener("load", function loadListener(aEvent) { michael@0: tabBrowser.removeEventListener("load", loadListener, true); michael@0: michael@0: let contentWindow = tab.linkedBrowser.contentWindow; michael@0: gBrowser.removeTab(tab); michael@0: michael@0: SimpleTest.executeSoon(function() { michael@0: ok(Components.utils.isDeadWrapper(contentWindow), michael@0: 'Window should be dead.'); michael@0: finish(); michael@0: }); michael@0: }, true); michael@0: }