Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit e997e6b

Browse files
committed
Backport expression error test (#5867)
1 parent feade09 commit e997e6b

File tree

2 files changed

+4
-35
lines changed

2 files changed

+4
-35
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
global:
1111
- DISPLAY=':99.0'
1212
- YARN_VERSION='0.24.5'
13-
- MC_COMMIT='5bc910c1f477' # https://hg.mozilla.org/mozilla-central/shortlog
13+
- MC_COMMIT='7b40283bf1c7' # https://hg.mozilla.org/mozilla-central/shortlog
1414

1515
notifications:
1616
slack:

src/test/mochitest/browser_dbg-expressions-error.js

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -22,55 +22,24 @@ function getValue(dbg, index) {
2222
}
2323

2424
async function addExpression(dbg, input) {
25-
info("Adding an expression");
26-
findElementWithSelector(dbg, expressionSelectors.input).focus();
27-
type(dbg, input);
28-
pressKey(dbg, "Enter");
29-
await waitForDispatch(dbg, "EVALUATE_EXPRESSION");
30-
}
31-
32-
async function editExpression(dbg, input) {
33-
info("updating the expression");
34-
dblClickElement(dbg, "expressionNode", 1);
35-
// Position cursor reliably at the end of the text.
36-
const evaluation = waitForDispatch(dbg, "EVALUATE_EXPRESSION");
37-
pressKey(dbg, "End");
38-
type(dbg, input);
39-
pressKey(dbg, "Enter");
40-
await evaluation;
41-
}
42-
43-
/*
44-
* When we add a bad expression, we'll pause,
45-
* resume, and wait for the expression to finish being evaluated.
46-
*/
47-
async function addBadExpression(dbg, input) {
4825
const evaluation = waitForDispatch(dbg, "EVALUATE_EXPRESSION");
49-
5026
findElementWithSelector(dbg, expressionSelectors.input).focus();
5127
type(dbg, input);
5228
pressKey(dbg, "Enter");
53-
54-
await waitForPaused(dbg);
55-
56-
ok(dbg.selectors.isEvaluatingExpression(dbg.getState()));
57-
await resume(dbg);
5829
await evaluation;
5930
}
6031

6132
add_task(async function() {
6233
const dbg = await initDebugger("doc-script-switching.html");
6334

64-
const onPausedOnException = togglePauseOnExceptions(dbg, true, false);
35+
await togglePauseOnExceptions(dbg, true, false);
6536

6637
// add a good expression, 2 bad expressions, and another good one
6738
await addExpression(dbg, "location");
68-
await addBadExpression(dbg, "foo.bar");
69-
await addBadExpression(dbg, "foo.batt");
39+
await addExpression(dbg, "foo.bar");
40+
await addExpression(dbg, "foo.batt");
7041
await addExpression(dbg, "2");
7142

72-
await onPausedOnException;
73-
7443
// check the value of
7544
is(getValue(dbg, 2), "(unavailable)");
7645
is(getValue(dbg, 3), "(unavailable)");

0 commit comments

Comments
 (0)