Bug 1213680 - Stop using picker by default when opening inspector (r=pbrosset)

This commit is contained in:
Bill McCloskey 2015-11-18 20:00:28 -08:00
Родитель c15d73943a
Коммит 234f2a465f
2 изменённых файлов: 10 добавлений и 16 удалений

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

@ -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)