summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/general/browser_bug664672.js
blob: 2064f77d0502916b5b441dbf027bbd134fdca37e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function test() {
  waitForExplicitFinish();

  var tab = gBrowser.addTab();

  tab.addEventListener("TabClose", function () {
    tab.removeEventListener("TabClose", arguments.callee, false);

    ok(tab.linkedBrowser, "linkedBrowser should still exist during the TabClose event");

    executeSoon(function () {
      ok(!tab.linkedBrowser, "linkedBrowser should be gone after the TabClose event");

      finish();
    });
  }, false);

  gBrowser.removeTab(tab);
}