Bug 1461056 - Remove browser_ext_geckoProfiler_symbolicate test. r?dthayer
The thing that it's testing is being removed.
I couldn't think of something that I could replace the test with. Maybe once we have
bug 1457481 we can check in an actual ELF binary and check that we're dumping its
symbol table correctly.
MozReview-Commit-ID: 9AXUwqPrivl
--- a/browser/components/extensions/test/browser/browser-common.ini
+++ b/browser/components/extensions/test/browser/browser-common.ini
@@ -1,17 +1,16 @@
[DEFAULT]
prefs =
dom.animations-api.core.enabled=true
support-files =
head.js
head_pageAction.js
head_sessions.js
head_webNavigation.js
- profilerSymbols.sjs
context.html
context_frame.html
ctxmenu-image.png
context_tabs_onUpdated_page.html
context_tabs_onUpdated_iframe.html
file_clearplugindata.html
file_find_frames.html
file_popup_api_injection_a.html
@@ -88,17 +87,16 @@ skip-if = (os == 'win' && !debug) # bug
[browser_ext_devtools_network.js]
[browser_ext_devtools_page.js]
[browser_ext_devtools_panel.js]
[browser_ext_devtools_panels_elements.js]
[browser_ext_devtools_panels_elements_sidebar.js]
support-files =
../../../../../devtools/client/inspector/extensions/test/head_devtools_inspector_sidebar.js
[browser_ext_find.js]
-[browser_ext_geckoProfiler_symbolicate.js]
[browser_ext_getViews.js]
[browser_ext_history_redirect.js]
[browser_ext_identity_indication.js]
[browser_ext_incognito_views.js]
[browser_ext_incognito_popup.js]
[browser_ext_lastError.js]
[browser_ext_menus.js]
[browser_ext_menus_event_order.js]
deleted file mode 100644
--- a/browser/components/extensions/test/browser/browser_ext_geckoProfiler_symbolicate.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set sts=2 sw=2 et tw=80: */
-"use strict";
-
-let getExtension = () => {
- return ExtensionTestUtils.loadExtension({
- background: async function() {
- const [addresses, indices, strings] = await browser.geckoProfiler.getSymbols("test.pdb",
- "ASDFQWERTY");
-
- function getSymbolAtAddress(address) {
- const index = addresses.indexOf(address);
- if (index == -1) {
- return null;
- }
-
- const nameBuffer = strings.subarray(indices[index], indices[index + 1]);
- const decoder = new TextDecoder("utf-8");
-
- return decoder.decode(nameBuffer);
- }
-
- browser.test.assertEq(getSymbolAtAddress(0x3fc74), "test_public_symbol", "Contains public symbol");
- browser.test.assertEq(getSymbolAtAddress(0x40330), "test_func_symbol", "Contains func symbol");
- browser.test.sendMessage("symbolicated");
- },
-
- manifest: {
- "permissions": ["geckoProfiler"],
- "applications": {
- "gecko": {
- "id": "profilertest@mozilla.com",
- },
- },
- },
- });
-};
-
-add_task(async function testProfilerControl() {
- await SpecialPowers.pushPrefEnv({
- set: [
- [
- "extensions.geckoProfiler.symbols.url",
- "http://mochi.test:8888/browser/browser/components/extensions/test/browser/profilerSymbols.sjs?path=",
- ],
- [
- "extensions.geckoProfiler.acceptedExtensionIds",
- "profilertest@mozilla.com",
- ],
- ],
- });
-
- let extension = getExtension();
- await extension.startup();
- await extension.awaitMessage("symbolicated");
- await extension.unload();
-});
deleted file mode 100644
--- a/browser/components/extensions/test/browser/profilerSymbols.sjs
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const SYMBOLS_FILE =
-`MODULE windows x86_64 A712ED458B2542C18785C19D17D64D842 test.pdb
-
-INFO CODE_ID 58EE0F7F3EDD000 test.dll
-
-PUBLIC 3fc74 0 test_public_symbol
-
-FUNC 40330 8e 0 test_func_symbol
-
-40330 42 22 2229
-
-40372 3a 23 2229
-
-403ac 12 23 2229
-`;
-
-function handleRequest(req, resp) {
- let match = /path=([^\/]+)\/([^\/]+)\/([^\/]+)/.exec(req.queryString);
- if (match && match[1] == "test.pdb") {
- resp.write(SYMBOLS_FILE);
- } else {
- resp.setStatusLine(null, 404, 'Not Found');
- }
-}