browser_bug594131.js (887B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 function test() { 6 // eslint-disable-next-line @microsoft/sdl/no-insecure-url 7 let newTab = BrowserTestUtils.addTab(gBrowser, "http://example.com"); 8 waitForExplicitFinish(); 9 BrowserTestUtils.browserLoaded(newTab.linkedBrowser).then(mainPart); 10 11 function mainPart() { 12 gBrowser.pinTab(newTab); 13 gBrowser.selectedTab = newTab; 14 15 // eslint-disable-next-line @microsoft/sdl/no-insecure-url 16 openTrustedLinkIn("http://example.org/", "current", { 17 inBackground: true, 18 }); 19 isnot(gBrowser.selectedTab, newTab, "shouldn't load in background"); 20 21 gBrowser.removeTab(newTab); 22 gBrowser.removeTab(gBrowser.tabs[1]); // example.org tab 23 finish(); 24 } 25 }