mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-14 15:37:55 +00:00
21 lines
540 B
JavaScript
21 lines
540 B
JavaScript
|
function test() {
|
||
|
var tab = gBrowser.addTab(null, {skipAnimation: true});
|
||
|
gBrowser.selectedTab = tab;
|
||
|
|
||
|
var gotTabAttrModified = false;
|
||
|
var gotTabClose = false;
|
||
|
|
||
|
tab.addEventListener("TabClose", function () {
|
||
|
gotTabClose = true;
|
||
|
|
||
|
tab.addEventListener("TabAttrModified", function () {
|
||
|
gotTabAttrModified = true;
|
||
|
}, false);
|
||
|
}, false);
|
||
|
|
||
|
gBrowser.removeTab(tab);
|
||
|
|
||
|
ok(gotTabClose, "should have got the TabClose event");
|
||
|
ok(!gotTabAttrModified, "shouldn't have got the TabAttrModified event after TabClose");
|
||
|
}
|