Backed out changeset 9b32011328f0 (bug 1402256) for multiple perma failures. CLOSED TREE

This commit is contained in:
Razvan Maries 2020-05-17 23:23:15 +03:00
Родитель c2250521a3
Коммит ec21f65bf4
4 изменённых файлов: 0 добавлений и 62 удалений

Просмотреть файл

@ -912,12 +912,6 @@ this.tabs = class extends ExtensionAPI {
nativeTab.linkedBrowser.reloadWithFlags(flags);
},
async warmup(tabId) {
let nativeTab = tabTracker.getTab(tabId);
let tabbrowser = nativeTab.ownerGlobal.gBrowser;
tabbrowser.warmupTab(nativeTab);
},
async get(tabId) {
return tabManager.get(tabId).convert();
},

Просмотреть файл

@ -1023,21 +1023,6 @@
}
]
},
{
"name": "warmup",
"type": "function",
"description": "Warm up a tab",
"async": "callback",
"parameters": [
{
"type": "integer",
"name": "tabId",
"minimum": 0,
"optional": false,
"description": "The ID of the tab to warm up."
}
]
},
{
"name": "remove",
"type": "function",

Просмотреть файл

@ -271,7 +271,6 @@ skip-if = os == 'mac' # Save as PDF not supported on Mac OS X
[browser_ext_tabs_update.js]
[browser_ext_tabs_update_highlighted.js]
[browser_ext_tabs_update_url.js]
[browser_ext_tabs_warmup.js]
[browser_ext_tabs_zoom.js]
[browser_ext_themes_validation.js]
[browser_ext_topSites.js]

Просмотреть файл

@ -1,40 +0,0 @@
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set sts=2 sw=2 et tw=80: */
"use strict";
add_task(async function testWarmupTab() {
let tab1 = await BrowserTestUtils.openNewForegroundTab(
gBrowser,
"http://example.net/"
);
let tab2 = await BrowserTestUtils.openNewForegroundTab(
gBrowser,
"about:blank"
);
Assert.ok(!tab1.linkedBrowser.renderLayers, "tab is not warm yet");
let extension = ExtensionTestUtils.loadExtension({
manifest: {
permissions: ["tabs"],
},
background: async function() {
let backgroundTab = (
await browser.tabs.query({
lastFocusedWindow: true,
url: "http://example.net/",
active: false,
})
)[0];
await browser.tabs.warmup(backgroundTab.id);
browser.test.notifyPass("tabs.warmup");
},
});
await extension.startup();
await extension.awaitFinish("tabs.warmup");
Assert.ok(tab1.linkedBrowser.renderLayers, "tab has been warmed up");
gBrowser.removeTab(tab1);
gBrowser.removeTab(tab2);
await extension.unload();
});