зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1213680 - Stop using picker by default when opening inspector (r=pbrosset)
This commit is contained in:
Родитель
c15d73943a
Коммит
234f2a465f
|
@ -103,9 +103,6 @@ Tools.inspector = {
|
|||
],
|
||||
|
||||
preventClosingOnKey: true,
|
||||
onkey: function(panel) {
|
||||
panel.toolbox.highlighterUtils.togglePicker();
|
||||
},
|
||||
|
||||
isTargetSupported: function(target) {
|
||||
return target.hasActor("inspector");
|
||||
|
|
|
@ -58,28 +58,25 @@ function test()
|
|||
}
|
||||
|
||||
gDevTools.once("toolbox-ready", (e, toolbox) => {
|
||||
inspectorShouldBeOpenAndHighlighting(toolbox.getCurrentPanel(), toolbox);
|
||||
// The inspector is already selected at this point, but we wait
|
||||
// for the signal here to avoid confusing ourselves when we wait
|
||||
// for the next select-tool-command signal.
|
||||
gDevTools.once("select-tool-command", () => {
|
||||
inspectorShouldBeSelected(toolbox.getCurrentPanel(), toolbox);
|
||||
});
|
||||
});
|
||||
|
||||
keysetMap.inspector.synthesizeKey();
|
||||
}
|
||||
|
||||
function inspectorShouldBeOpenAndHighlighting(aInspector, aToolbox)
|
||||
function inspectorShouldBeSelected(aInspector, aToolbox)
|
||||
{
|
||||
is (aToolbox.currentToolId, "inspector", "Correct tool has been loaded");
|
||||
|
||||
aToolbox.once("picker-started", () => {
|
||||
ok(true, "picker-started event received, highlighter started");
|
||||
keysetMap.inspector.synthesizeKey();
|
||||
|
||||
aToolbox.once("picker-stopped", () => {
|
||||
ok(true, "picker-stopped event received, highlighter stopped");
|
||||
gDevTools.once("select-tool-command", () => {
|
||||
webconsoleShouldBeSelected(aToolbox);
|
||||
});
|
||||
keysetMap.webconsole.synthesizeKey();
|
||||
});
|
||||
gDevTools.once("select-tool-command", (x, toolId) => {
|
||||
webconsoleShouldBeSelected(aToolbox);
|
||||
});
|
||||
keysetMap.webconsole.synthesizeKey();
|
||||
}
|
||||
|
||||
function webconsoleShouldBeSelected(aToolbox)
|
||||
|
|
Загрузка…
Ссылка в новой задаче