Skip to content

Commit

Permalink
merge fx-team to mozilla-central a=merge
Browse files Browse the repository at this point in the history
  • Loading branch information
BavarianTomcat committed Aug 9, 2016
2 parents 3a0ed75 + e40a1e1 commit 9b0fe2c
Show file tree
Hide file tree
Showing 52 changed files with 387 additions and 285 deletions.
7 changes: 6 additions & 1 deletion browser/components/search/content/search.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1746,7 +1746,12 @@
let stopEvent = false;
// Tab cycles through the one-offs and moves the focus out at the end.
if (event.keyCode == KeyEvent.DOM_VK_TAB) {
// But only if non-Shift modifiers aren't also pressed, to avoid
// clobbering other shortcuts.
if (event.keyCode == KeyEvent.DOM_VK_TAB &&
!event.altKey &&
!event.ctrlKey &&
!event.metaKey) {
stopEvent = this.advanceSelection(!event.shiftKey, false, true);
}
Expand Down
4 changes: 4 additions & 0 deletions browser/themes/shared/controlcenter/panel.inc.css
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@

/* CONTENT */

.identity-popup-permission-label,
.identity-popup-permission-state-label,
#identity-popup-security-content > description,
#identity-popup-security-descriptions > description,
#identity-popup-securityView-header > description,
Expand Down Expand Up @@ -384,6 +386,7 @@ description#identity-popup-content-verifier,
}

.identity-popup-permission-state-label {
margin-inline-end: 5px;
text-align: end;
opacity: 0.6;
}
Expand All @@ -395,6 +398,7 @@ description#identity-popup-content-verifier,
border-radius: 50%;
min-width: 0;
padding: 2px;
background-color: transparent;
}

.identity-popup-permission-remove-button > .button-box {
Expand Down
3 changes: 2 additions & 1 deletion devtools/client/debugger/content/views/sources-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,6 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, {
*/
_onConditionalPopupShowing: function () {
this._conditionalPopupVisible = true; // Used in tests.
window.emit(EVENTS.CONDITIONAL_BREAKPOINT_POPUP_SHOWING);
},

/**
Expand All @@ -1177,6 +1176,7 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, {
_onConditionalPopupShown: function () {
this._cbTextbox.focus();
this._cbTextbox.select();
window.emit(EVENTS.CONDITIONAL_BREAKPOINT_POPUP_SHOWN);
},

/**
Expand All @@ -1199,6 +1199,7 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, {
*/
_onConditionalPopupHidden: function () {
this._cbPanel.hidden = true;
window.emit(EVENTS.CONDITIONAL_BREAKPOINT_POPUP_HIDDEN);
},

/**
Expand Down
6 changes: 3 additions & 3 deletions devtools/client/debugger/debugger-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ const EVENTS = {
BREAKPOINT_HIDDEN_IN_EDITOR: "Debugger:BreakpointHiddenInEditor",
BREAKPOINT_HIDDEN_IN_PANE: "Debugger:BreakpointHiddenInPane",

// When a conditional breakpoint's popup is showing or hiding.
CONDITIONAL_BREAKPOINT_POPUP_SHOWING: "Debugger:ConditionalBreakpointPopupShowing",
CONDITIONAL_BREAKPOINT_POPUP_HIDING: "Debugger:ConditionalBreakpointPopupHiding",
// When a conditional breakpoint's popup is shown/hidden.
CONDITIONAL_BREAKPOINT_POPUP_SHOWN: "Debugger:ConditionalBreakpointPopupShown",
CONDITIONAL_BREAKPOINT_POPUP_HIDDEN: "Debugger:ConditionalBreakpointPopupHidden",

// When event listeners are fetched or event breakpoints are updated.
EVENT_LISTENERS_FETCHED: "Debugger:EventListenersFetched",
Expand Down
6 changes: 5 additions & 1 deletion devtools/client/debugger/test/mochitest/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,11 @@ skip-if = e10s && debug
skip-if = e10s && debug
[browser_dbg_watch-expressions-02.js]
skip-if = e10s && debug
[browser_dbg_worker-console.js]
[browser_dbg_worker-console-01.js]
skip-if = e10s && debug
[browser_dbg_worker-console-02.js]
skip-if = e10s && debug
[browser_dbg_worker-console-03.js]
skip-if = e10s && debug
[browser_dbg_worker-source-map.js]
skip-if = e10s && debug
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function test() {
const constants = gDebugger.require("./content/constants");
const actions = bindActionCreators(gPanel);
const getState = gDebugger.DebuggerController.getState;
const CONDITIONAL_POPUP_SHOWN = gDebugger.EVENTS.CONDITIONAL_BREAKPOINT_POPUP_SHOWN;

// This test forces conditional breakpoints to be evaluated on the
// client-side
Expand All @@ -43,23 +44,32 @@ function test() {

function modBreakpoint2() {
setCaretPosition(19);
let popupShown = waitForDebuggerEvents(gPanel, CONDITIONAL_POPUP_SHOWN);
gSources._onCmdAddConditionalBreakpoint();
return popupShown;
}

function addBreakpoint3() {
function* addBreakpoint3() {
let finished = waitForDispatch(gPanel, constants.ADD_BREAKPOINT);
let popupShown = waitForDebuggerEvents(gPanel, CONDITIONAL_POPUP_SHOWN);
setCaretPosition(20);
gSources._onCmdAddConditionalBreakpoint();
return finished;
yield finished;
yield popupShown;
}

function modBreakpoint3() {
let finished = waitForDispatch(gPanel, constants.SET_BREAKPOINT_CONDITION);
function* modBreakpoint3() {
setCaretPosition(20);

let popupShown = waitForDebuggerEvents(gPanel, CONDITIONAL_POPUP_SHOWN);
gSources._onCmdAddConditionalBreakpoint();
yield popupShown;

typeText(gSources._cbTextbox, "bamboocha");

let finished = waitForDispatch(gPanel, constants.SET_BREAKPOINT_CONDITION);
EventUtils.sendKey("RETURN", gDebugger);
return finished;
yield finished;
}

function addBreakpoint4() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function test() {
const bp = queries.getBreakpoint(getState(), location);
is(bp.condition, "hello", "The conditional expression is correct.");

let finished = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.CONDITIONAL_BREAKPOINT_POPUP_SHOWING);
let finished = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.CONDITIONAL_BREAKPOINT_POPUP_SHOWN);
EventUtils.sendMouseEvent({ type: "click" },
gDebugger.document.querySelector(".dbg-breakpoint"),
gDebugger);
Expand All @@ -63,7 +63,7 @@ function test() {
yield actions.setBreakpointCondition(location, "foo");
yield actions.addBreakpoint(location);

finished = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.CONDITIONAL_BREAKPOINT_POPUP_SHOWING);
finished = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.CONDITIONAL_BREAKPOINT_POPUP_SHOWN);
EventUtils.sendMouseEvent({ type: "click" },
gDebugger.document.querySelector(".dbg-breakpoint"),
gDebugger);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function test() {
const constants = gDebugger.require("./content/constants");
const actions = bindActionCreators(gPanel);
const getState = gDebugger.DebuggerController.getState;
const CONDITIONAL_POPUP_SHOWN = gDebugger.EVENTS.CONDITIONAL_BREAKPOINT_POPUP_SHOWN;

function addBreakpoint1() {
return actions.addBreakpoint({ actor: gSources.selectedValue, line: 18 });
Expand All @@ -38,23 +39,34 @@ function test() {

function modBreakpoint2() {
setCaretPosition(19);

let popupShown = waitForDebuggerEvents(gPanel, CONDITIONAL_POPUP_SHOWN);
gSources._onCmdAddConditionalBreakpoint();
return popupShown;
}

function addBreakpoint3() {
function* addBreakpoint3() {
let finished = waitForDispatch(gPanel, constants.ADD_BREAKPOINT);
let popupShown = waitForDebuggerEvents(gPanel, CONDITIONAL_POPUP_SHOWN);

setCaretPosition(20);
gSources._onCmdAddConditionalBreakpoint();
return finished;
yield finished;
yield popupShown;
}

function modBreakpoint3() {
let finished = waitForDispatch(gPanel, constants.SET_BREAKPOINT_CONDITION);
function* modBreakpoint3() {
setCaretPosition(20);

let popupShown = waitForDebuggerEvents(gPanel, CONDITIONAL_POPUP_SHOWN);
gSources._onCmdAddConditionalBreakpoint();
yield popupShown;

typeText(gSources._cbTextbox, "bamboocha");

let finished = waitForDispatch(gPanel, constants.SET_BREAKPOINT_CONDITION);
EventUtils.sendKey("RETURN", gDebugger);
return finished;
yield finished;
}

function addBreakpoint4() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function test() {
const bp = queries.getBreakpoint(getState(), location);
is(bp.condition, "hello", "The conditional expression is correct.");

let finished = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.CONDITIONAL_BREAKPOINT_POPUP_SHOWING);
let finished = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.CONDITIONAL_BREAKPOINT_POPUP_SHOWN);
EventUtils.sendMouseEvent({ type: "click" },
gDebugger.document.querySelector(".dbg-breakpoint"),
gDebugger);
Expand All @@ -60,7 +60,7 @@ function test() {
yield actions.setBreakpointCondition(location, "foo");
yield actions.addBreakpoint(location);

finished = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.CONDITIONAL_BREAKPOINT_POPUP_SHOWING);
finished = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.CONDITIONAL_BREAKPOINT_POPUP_SHOWN);
EventUtils.sendMouseEvent({ type: "click" },
gDebugger.document.querySelector(".dbg-breakpoint"),
gDebugger);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Check to make sure that a worker can be attached to a toolbox
// and that the console works.

var TAB_URL = EXAMPLE_URL + "doc_WorkerActor.attachThread-tab.html";
var WORKER_URL = "code_WorkerActor.attachThread-worker.js";

add_task(function* testNormalExecution() {
let {client, tab, tabClient, workerClient, toolbox, gDebugger} =
yield initWorkerDebugger(TAB_URL, WORKER_URL);

let jsterm = yield getSplitConsole(toolbox);
let executed = yield jsterm.execute("this.location.toString()");
ok(executed.textContent.includes(WORKER_URL),
"Evaluating the global's location works");

terminateWorkerInTab(tab, WORKER_URL);
yield waitForWorkerClose(workerClient);
yield gDevTools.closeToolbox(TargetFactory.forWorker(workerClient));
yield close(client);
yield removeTab(tab);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// Check to make sure that a worker can be attached to a toolbox
// and that the console works.

var TAB_URL = EXAMPLE_URL + "doc_WorkerActor.attachThread-tab.html";
var WORKER_URL = "code_WorkerActor.attachThread-worker.js";

add_task(function* testWhilePaused() {
let {client, tab, tabClient, workerClient, toolbox, gDebugger} =
yield initWorkerDebugger(TAB_URL, WORKER_URL);

let gTarget = gDebugger.gTarget;
let gResumeButton = gDebugger.document.getElementById("resume");
let gResumeKey = gDebugger.document.getElementById("resumeKey");

// Execute some basic math to make sure evaluations are working.
let jsterm = yield getSplitConsole(toolbox);
let executed = yield jsterm.execute("10000+1");
ok(executed.textContent.includes("10001"), "Text for message appeared correct");

// Pause the worker by waiting for next execution and then sending a message to
// it from the main thread.
let oncePaused = gTarget.once("thread-paused");
EventUtils.sendMouseEvent({ type: "mousedown" }, gResumeButton, gDebugger);
once(gDebugger.gClient, "willInterrupt").then(() => {
info("Posting message to worker, then waiting for a pause");
postMessageToWorkerInTab(tab, WORKER_URL, "ping");
});
yield oncePaused;

let command1 = jsterm.execute("10000+2");
let command2 = jsterm.execute("10000+3");
let command3 = jsterm.execute("foobar"); // throw an error

info("Trying to get the result of command1");
executed = yield command1;
ok(executed.textContent.includes("10002"),
"command1 executed successfully");

info("Trying to get the result of command2");
executed = yield command2;
ok(executed.textContent.includes("10003"),
"command2 executed successfully");

info("Trying to get the result of command3");
executed = yield command3;
// XXXworkers This is failing until Bug 1215120 is resolved.
todo(executed.textContent.includes("ReferenceError: foobar is not defined"),
"command3 executed successfully");

let onceResumed = gTarget.once("thread-resumed");
EventUtils.sendMouseEvent({ type: "mousedown" }, gResumeButton, gDebugger);
yield onceResumed;

terminateWorkerInTab(tab, WORKER_URL);
yield waitForWorkerClose(workerClient);
yield gDevTools.closeToolbox(TargetFactory.forWorker(workerClient));
yield close(client);
yield removeTab(tab);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Check to make sure that a worker can be attached to a toolbox
// and that the console works.

var TAB_URL = EXAMPLE_URL + "doc_WorkerActor.attachThread-tab.html";
var WORKER_URL = "code_WorkerActor.attachThread-worker.js";

// Test to see if creating the pause from the console works.
add_task(function* testPausedByConsole() {
let {client, tab, tabClient, workerClient, toolbox, gDebugger} =
yield initWorkerDebugger(TAB_URL, WORKER_URL);

let gTarget = gDebugger.gTarget;
let gResumeButton = gDebugger.document.getElementById("resume");
let gResumeKey = gDebugger.document.getElementById("resumeKey");

let jsterm = yield getSplitConsole(toolbox);
let executed = yield jsterm.execute("10000+1");
ok(executed.textContent.includes("10001"),
"Text for message appeared correct");

let oncePaused = gTarget.once("thread-paused");
EventUtils.sendMouseEvent({ type: "mousedown" }, gResumeButton, gDebugger);
let pausedExecution = jsterm.execute("10000+2");

info("Executed a command with 'break on next' active, waiting for pause");
yield oncePaused;

executed = yield jsterm.execute("10000+3");
ok(executed.textContent.includes("10003"),
"Text for message appeared correct");

info("Waiting for a resume");
let onceResumed = gTarget.once("thread-resumed");
EventUtils.sendMouseEvent({ type: "mousedown" }, gResumeButton, gDebugger);
yield onceResumed;

executed = yield pausedExecution;
ok(executed.textContent.includes("10002"),
"Text for message appeared correct");

terminateWorkerInTab(tab, WORKER_URL);
yield waitForWorkerClose(workerClient);
yield gDevTools.closeToolbox(TargetFactory.forWorker(workerClient));
yield close(client);
yield removeTab(tab);
});
Loading

0 comments on commit 9b0fe2c

Please sign in to comment.