зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1337509 - Do not create tab objects with an unsupported 'selected' property. r=bsilverberg,mixedpuppy
MozReview-Commit-ID: 4Bi6LdNUxMo --HG-- extra : rebase_source : 52baba39e08bc9d250ace3f4b46a591d7f641d47
This commit is contained in:
Родитель
e52aba5a9b
Коммит
163e27b705
|
@ -557,7 +557,6 @@ class Tab extends TabBase {
|
|||
sessionId: String(tabData.closedId),
|
||||
index: tabData.pos ? tabData.pos : 0,
|
||||
windowId: window && windowTracker.getId(window),
|
||||
selected: false,
|
||||
highlighted: false,
|
||||
active: false,
|
||||
pinned: false,
|
||||
|
|
|
@ -8,6 +8,9 @@ function expectedTabInfo(tab, window) {
|
|||
url: browser.currentURI.spec,
|
||||
title: browser.contentTitle,
|
||||
favIconUrl: window.gBrowser.getIcon(tab),
|
||||
// 'selected' is marked as unsupported in schema, so we've removed it.
|
||||
// For more details, see bug 1337509
|
||||
selected: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,9 @@ add_task(function* test_create_options() {
|
|||
active: true,
|
||||
pinned: false,
|
||||
url: "about:newtab",
|
||||
// 'selected' is marked as unsupported in schema, so we've removed it.
|
||||
// For more details, see bug 1337509
|
||||
selected: undefined,
|
||||
};
|
||||
|
||||
let tests = [
|
||||
|
|
|
@ -22,8 +22,8 @@ add_task(function* testDuplicateTab() {
|
|||
browser.test.assertEq("http://example.net/", tab.url);
|
||||
// Should be the second tab, next to the one duplicated.
|
||||
browser.test.assertEq(1, tab.index);
|
||||
// Should be selected by default.
|
||||
browser.test.assertTrue(tab.selected);
|
||||
// Should be active by default.
|
||||
browser.test.assertTrue(tab.active);
|
||||
browser.test.notifyPass("tabs.duplicate");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -24,7 +24,7 @@ function checkWindow(window) {
|
|||
}
|
||||
|
||||
function checkTab(tab, windowId, incognito) {
|
||||
for (let prop of ["selected", "highlighted", "active", "pinned"]) {
|
||||
for (let prop of ["highlighted", "active", "pinned"]) {
|
||||
is(tab[prop], false, `closed tab has the expected value for ${prop}`);
|
||||
}
|
||||
is(tab.windowId, windowId, "closed tab has the expected value for windowId");
|
||||
|
|
|
@ -461,7 +461,6 @@ class TabBase {
|
|||
id: this.id,
|
||||
index: this.index,
|
||||
windowId: this.windowId,
|
||||
selected: this.selected,
|
||||
highlighted: this.selected,
|
||||
active: this.selected,
|
||||
pinned: this.pinned,
|
||||
|
|
Загрузка…
Ссылка в новой задаче