Revert "Bug 1992418 - add runtime.getVersion() r=robwu" for causing mochitests failures at apis.html

This reverts commit df22bd7905.
This commit is contained in:
Silaghi
2026-09-12 20:23:11 +00:00
committed by asilaghi@mozilla.com
parent 6dc230d73f
commit afed2108b5
4 changed files with 0 additions and 64 deletions
@@ -126,10 +126,6 @@ this.runtime = class extends ExtensionAPI {
return context.lastError;
},
getVersion() {
return extension.manifest.version;
},
getManifest() {
return Cu.cloneInto(extension.manifest, context.cloneScope);
},
@@ -382,17 +382,6 @@
"description": "The manifest details."
}
},
{
"name": "getVersion",
"allowedContexts": ["content", "devtools"],
"description": "Returns the extension version as declared in the manifest.",
"type": "function",
"parameters": [],
"returns": {
"type": "string",
"description": "The extension version."
}
},
{
"name": "getURL",
"type": "function",
@@ -1,47 +0,0 @@
"use strict";
const server = createHttpServer({ hosts: ["example.com"] });
server.registerDirectory("/data/", do_get_file("data"));
add_task(async function test_runtime_getVersion() {
const version = "1.2.3";
const extension = ExtensionTestUtils.loadExtension({
manifest: {
version: version,
content_scripts: [
{
matches: ["http://example.com/data/file_sample.html"],
js: ["content_script.js"],
},
],
},
background() {
browser.test.assertEq(
browser.runtime.getVersion(),
version,
"runtime.getVersion() from background script is correct"
);
},
files: {
"content_script.js"() {
browser.test.assertEq(
browser.runtime.getVersion(),
version,
"runtime.getVersion() from content script is correct"
);
},
},
});
await extension.startup();
const contentPage = await ExtensionTestUtils.loadContentPage(
"http://example.com/data/file_sample.html"
);
await contentPage.close();
await extension.unload();
});
@@ -610,8 +610,6 @@ skip-if = [
["test_ext_runtime_getPlatformInfo.js"]
["test_ext_runtime_getVersion.js"]
["test_ext_runtime_id.js"]
["test_ext_runtime_messaging_self.js"]