Backed out changeset 3f0cde4a61e5 (bug 1572867) for causing browser_toolbox_telemetry_open_event.js to perma fail CLOSED TREE

This commit is contained in:
Ciure Andrei 2019-08-19 17:25:29 +03:00
Родитель caf33e97db
Коммит 8f8f28acdb
4 изменённых файлов: 5 добавлений и 41 удалений

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

@ -581,7 +581,7 @@ DevTools.prototype = {
: "DEVTOOLS_WARM_TOOLBOX_OPEN_DELAY_MS";
this._telemetry.getKeyedHistogramById(telemetryKey).add(toolId, delay);
const browserWin = toolbox.topWindow;
const browserWin = toolbox.win.top;
this._telemetry.addEventProperty(
browserWin,
"open",

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

@ -128,7 +128,6 @@ run-if = e10s
[browser_toolbox_telemetry_close.js]
[browser_toolbox_telemetry_enter.js]
[browser_toolbox_telemetry_exit.js]
[browser_toolbox_telemetry_open_event.js]
[browser_toolbox_textbox_context_menu.js]
[browser_toolbox_theme.js]
[browser_toolbox_theme_registration.js]

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

@ -1,35 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Test that the "open" telemetry event is correctly logged when opening the
// toolbox.
const ALL_CHANNELS = Ci.nsITelemetry.DATASET_ALL_CHANNELS;
add_task(async function() {
Services.prefs.clearUserPref("devtools.toolbox.selectedTool");
const tab = await addTab("data:text/html;charset=utf-8,Test open event");
info("Open the toolbox with a shortcut to trigger the open event");
const onToolboxReady = gDevTools.once("toolbox-ready");
EventUtils.synthesizeKey("VK_F12", {});
await onToolboxReady;
const snapshot = Services.telemetry.snapshotEvents(ALL_CHANNELS, true);
const events = snapshot.parent.filter(
event =>
event[1] === "devtools.main" && event[2] === "open" && event[4] === null
);
is(events.length, 1, "Telemetry open event was logged");
const extras = events[0][5];
is(extras.entrypoint, "KeyShortcut", "entrypoint extra is correct");
// The logged shortcut is `${modifiers}+${shortcut}`, which adds an
// extra `+` before F12 here.
// See https://searchfox.org/mozilla-central/rev/c7e8bc4996f979e5876b33afae3de3b1ab4f3ae1/devtools/startup/DevToolsStartup.jsm#1070
is(extras.shortcut, "+F12", "entrypoint shortcut is correct");
gBrowser.removeTab(tab);
});

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

@ -765,7 +765,7 @@ Toolbox.prototype = {
if (Services.prefs.getBoolPref(SPLITCONSOLE_ENABLED_PREF)) {
splitConsolePromise = this.openSplitConsole();
this.telemetry.addEventProperty(
this.topWindow,
this.win,
"open",
"tools",
null,
@ -774,7 +774,7 @@ Toolbox.prototype = {
);
} else {
this.telemetry.addEventProperty(
this.topWindow,
this.win,
"open",
"tools",
null,
@ -1295,7 +1295,7 @@ Toolbox.prototype = {
const currentTheme = Services.prefs.getCharPref("devtools.theme");
this.telemetry.keyedScalarAdd(CURRENT_THEME_SCALAR, currentTheme, 1);
const browserWin = this.topWindow;
const browserWin = this.win.top;
this.telemetry.preparePendingEvent(browserWin, "open", "tools", null, [
"entrypoint",
"first_panel",
@ -2576,7 +2576,7 @@ Toolbox.prototype = {
});
}
this.telemetry.addEventProperties(this.topWindow, "open", "tools", null, {
this.telemetry.addEventProperties(this.win, "open", "tools", null, {
width: width,
session_id: this.sessionId,
});