зеркало из https://github.com/mozilla/gecko-dev.git
Bug 939496 - Emit tabs open event for the first tab in a new. r=zer0
--HG-- extra : commitid : AGAOyL1fMh7
This commit is contained in:
Родитель
5c10c664ce
Коммит
4404f59ae6
|
@ -111,6 +111,7 @@ function addWindowTab(window, tabElement) {
|
|||
if (window)
|
||||
addListItem(window.tabs, tab);
|
||||
addListItem(allTabs, tab);
|
||||
emit(allTabs, "open", tab);
|
||||
}
|
||||
|
||||
// Find tabs in already open windows
|
||||
|
|
|
@ -1241,6 +1241,21 @@ exports["test ready event after window.open"] = function (assert, done) {
|
|||
});
|
||||
}
|
||||
|
||||
// related to bug #939496
|
||||
exports["test tab open event for new window"] = function(assert, done) {
|
||||
// ensure popups open in a new window and disable popup blocker
|
||||
setPref(OPEN_IN_NEW_WINDOW_PREF, 2);
|
||||
setPref(DISABLE_POPUP_PREF, false);
|
||||
|
||||
tabs.once('open', function onOpen(window) {
|
||||
assert.pass("tab open has occured");
|
||||
window.close(done);
|
||||
});
|
||||
|
||||
// open window to trigger observers
|
||||
browserWindows.open("about:logo");
|
||||
};
|
||||
|
||||
after(exports, function*(name, assert) {
|
||||
resetPopupPrefs();
|
||||
yield cleanUI();
|
||||
|
|
Загрузка…
Ссылка в новой задаче