mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 991347 - Hide the displaying of the canvas editor when debugging an addon target. r=vp
This commit is contained in:
parent
fe77cf2b9b
commit
4a6cb4cded
@ -7,7 +7,12 @@
|
||||
const ADDON3_URL = EXAMPLE_URL + "addon3.xpi";
|
||||
|
||||
let gAddon, gClient, gThreadClient, gDebugger, gSources;
|
||||
|
||||
let PREFS = [
|
||||
"devtools.canvasdebugger.enabled",
|
||||
"devtools.shadereditor.enabled",
|
||||
"devtools.profiler.enabled",
|
||||
"devtools.netmonitor.enabled"
|
||||
];
|
||||
function test() {
|
||||
Task.spawn(function () {
|
||||
if (!DebuggerServer.initialized) {
|
||||
@ -15,6 +20,13 @@ function test() {
|
||||
DebuggerServer.addBrowserActors();
|
||||
}
|
||||
|
||||
// Store and enable all optional dev tools panels
|
||||
let originalPrefs = PREFS.map(pref => {
|
||||
let original = Services.prefs.getBoolPref(pref);
|
||||
Services.prefs.setBoolPref(pref, true)
|
||||
return original;
|
||||
});
|
||||
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
let iframe = document.createElement("iframe");
|
||||
document.documentElement.appendChild(iframe);
|
||||
@ -37,6 +49,9 @@ function test() {
|
||||
yield closeConnection();
|
||||
yield debuggerPanel._toolbox.destroy();
|
||||
iframe.remove();
|
||||
|
||||
PREFS.forEach((pref, i) => Services.prefs.setBoolPref(pref, originalPrefs[i]));
|
||||
|
||||
finish();
|
||||
});
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ Tools.canvasDebugger = {
|
||||
tooltip: l10n("ToolboxCanvasDebugger.tooltip", canvasDebuggerStrings),
|
||||
|
||||
isTargetSupported: function(target) {
|
||||
return true;
|
||||
return !target.isAddon;
|
||||
},
|
||||
|
||||
build: function(iframeWindow, toolbox) {
|
||||
|
Loading…
Reference in New Issue
Block a user