From ec21f65bf464863df7ad7e9379c1dd726b60729e Mon Sep 17 00:00:00 2001 From: Razvan Maries Date: Sun, 17 May 2020 23:23:15 +0300 Subject: [PATCH] Backed out changeset 9b32011328f0 (bug 1402256) for multiple perma failures. CLOSED TREE --- .../components/extensions/parent/ext-tabs.js | 6 --- .../components/extensions/schemas/tabs.json | 15 ------- .../extensions/test/browser/browser.ini | 1 - .../test/browser/browser_ext_tabs_warmup.js | 40 ------------------- 4 files changed, 62 deletions(-) delete mode 100644 browser/components/extensions/test/browser/browser_ext_tabs_warmup.js diff --git a/browser/components/extensions/parent/ext-tabs.js b/browser/components/extensions/parent/ext-tabs.js index 7a3b1fd0b556..30617d4231a2 100644 --- a/browser/components/extensions/parent/ext-tabs.js +++ b/browser/components/extensions/parent/ext-tabs.js @@ -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(); }, diff --git a/browser/components/extensions/schemas/tabs.json b/browser/components/extensions/schemas/tabs.json index e48c021a6b0c..d6712809a456 100644 --- a/browser/components/extensions/schemas/tabs.json +++ b/browser/components/extensions/schemas/tabs.json @@ -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", diff --git a/browser/components/extensions/test/browser/browser.ini b/browser/components/extensions/test/browser/browser.ini index 2576ed0df5e0..4b5ff291d1e8 100644 --- a/browser/components/extensions/test/browser/browser.ini +++ b/browser/components/extensions/test/browser/browser.ini @@ -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] diff --git a/browser/components/extensions/test/browser/browser_ext_tabs_warmup.js b/browser/components/extensions/test/browser/browser_ext_tabs_warmup.js deleted file mode 100644 index 80f82287a274..000000000000 --- a/browser/components/extensions/test/browser/browser_ext_tabs_warmup.js +++ /dev/null @@ -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(); -});