Skip to content

Commit

Permalink
Bug 764545 - WebConsole default position should be "below"; r=msucan
Browse files Browse the repository at this point in the history
UltraBlame original commit: afc76272017b8852d9d9eb2a9a609c63c77a7e27
  • Loading branch information
marco-c committed Sep 28, 2019
1 parent 6d453f4 commit c9c241c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion browser/app/profile/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ pref("devtools.hud.height", 0);



pref("devtools.webconsole.position", "above");
pref("devtools.webconsole.position", "below");


pref("devtools.webconsole.filter.network", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,12 @@ function performTest() {
successFn: function()
{
let jstermMessage = HUD.outputNode.querySelector(".webconsole-msg-output");
EventUtils.synthesizeMouse(jstermMessage, 2, 2, {});
EventUtils.synthesizeMouse(networkLink, 2, 2, {});
EventUtils.sendMouseEvent({ type: "mousedown" }, jstermMessage);
EventUtils.sendMouseEvent({ type: "mouseup" }, jstermMessage);
EventUtils.sendMouseEvent({ type: "click" }, jstermMessage);
EventUtils.sendMouseEvent({ type: "mousedown" }, networkLink);
EventUtils.sendMouseEvent({ type: "mouseup" }, networkLink);
EventUtils.sendMouseEvent({ type: "click" }, networkLink);
},
failureFn: finishTest,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,12 @@ function performTest() {
successFn: function()
{
let jstermMessage = HUD.outputNode.querySelector(".webconsole-msg-output");
EventUtils.synthesizeMouse(jstermMessage, 2, 2, {});
EventUtils.synthesizeMouse(networkLink, 2, 2, {});
EventUtils.sendMouseEvent({ type: "mousedown" }, jstermMessage);
EventUtils.sendMouseEvent({ type: "mouseup" }, jstermMessage);
EventUtils.sendMouseEvent({ type: "click" }, jstermMessage);
EventUtils.sendMouseEvent({ type: "mousedown" }, networkLink);
EventUtils.sendMouseEvent({ type: "mouseup" }, networkLink);
EventUtils.sendMouseEvent({ type: "click" }, networkLink);
},
failureFn: finishTest,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ function onLoad() {
let hudRef = HUDService.hudReferences[hudId];
let hudBox = hudRef.HUDBox;

is(hudBox.parentNode.childNodes[0].getAttribute("id"), hudId,
is(hudBox.parentNode.childNodes[2].getAttribute("id"), hudId,
"initial console position is correct");

is(hudRef.positionMenuitems.above.getAttribute("checked"), "true",
"position menu checkbox is above");
is(Services.prefs.getCharPref(POSITION_PREF), "above", "pref is above");

hudRef.positionConsole("below");
let id = hudBox.parentNode.childNodes[2].getAttribute("id");
is(id, hudId, "below position is correct");

is(hudRef.positionMenuitems.below.getAttribute("checked"), "true",
"position menu checkbox is below");
is(Services.prefs.getCharPref(POSITION_PREF), "below", "pref is below");

hudRef.positionConsole("above");
let id = hudBox.parentNode.childNodes[0].getAttribute("id");
is(id, hudId, "above position is correct");

is(hudRef.positionMenuitems.above.getAttribute("checked"), "true",
"position menu checkbox is above");
is(Services.prefs.getCharPref(POSITION_PREF), "above", "pref is above");


document.addEventListener("popupshown", function popupShown() {
document.removeEventListener("popupshown", popupShown, false);
Expand Down

0 comments on commit c9c241c

Please sign in to comment.