author | Mélanie Chauvel (ariasuni) <perso@hack-libre.org> |
Tue, 05 Nov 2019 23:41:56 +0000 | |
changeset 562576 | 76069952bbb9295b6544275df036bbd875d30ca6 |
parent 562575 | bd4d1c8dc980524ac35c9550a59f67c4185ef9d2 |
child 562577 | 71b00388948f9cb015bf36023a513497ed897be8 |
push id | 12351 |
push user | ffxbld-merge |
push date | Mon, 02 Dec 2019 11:32:26 +0000 |
treeherder | mozilla-beta@dba4410526a2 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mixedpuppy |
bugs | 1563380 |
milestone | 72.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/browser/components/extensions/parent/ext-tabs.js +++ b/browser/components/extensions/parent/ext-tabs.js @@ -1091,30 +1091,20 @@ this.tabs = class extends ExtensionAPI { let gBrowser = nativeTab.ownerGlobal.gBrowser; let newTab = gBrowser.duplicateTab(nativeTab); tabListener.blockTabUntilRestored(newTab); return new Promise(resolve => { // We need to use SSTabRestoring because any attributes set before - // are ignored. SSTabRestored is too late and results in a jump in - // the UI. See http://bit.ly/session-store-api for more information. + // are ignored. newTab.addEventListener( "SSTabRestoring", function() { - // As the tab is restoring, move it to the correct position. - - // Pinned tabs that are duplicated are inserted - // after the existing pinned tab and pinned. - if (nativeTab.pinned) { - gBrowser.pinTab(newTab); - } - gBrowser.moveTabTo(newTab, nativeTab._tPos + 1); - gBrowser.selectedTab = newTab; resolve(tabManager.convert(newTab)); }, { once: true } ); }); },
--- a/browser/components/extensions/test/browser/browser_ext_tabs_duplicate.js +++ b/browser/components/extensions/test/browser/browser_ext_tabs_duplicate.js @@ -150,20 +150,20 @@ add_task(async function testDuplicatePin browser.tabs.query( { lastFocusedWindow: true, }, function(tabs) { // Duplicate the pinned tab, example.net. browser.tabs.duplicate(tabs[0].id, tab => { browser.test.assertEq("http://example.net/", tab.url); - // Should be the second tab, next to the one duplicated. + // Should be the second tab, next to the original. browser.test.assertEq(1, tab.index); - // Should be pinned. - browser.test.assertTrue(tab.pinned); + // Duplicated tab is not pinned, even if the original tab is. + browser.test.assertFalse(tab.pinned); browser.tabs.remove([tabs[0].id, tab.id]); browser.test.notifyPass("tabs.duplicate.pinned"); }); } ); }, });