Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/test/integration/tests/returnvalues.js b/src/test/integration/tests/returnvalues.js
- index 6237680..9e82d8b 100644
- --- a/src/test/integration/tests/returnvalues.js
- +++ b/src/test/integration/tests/returnvalues.js
- @@ -7,6 +7,7 @@ const {
- resume,
- stepIn,
- waitForPaused,
- + pauseTest
- } = require("../utils");
- function getLabel(dbg, index) {
- @@ -25,6 +26,10 @@ async function testReturnValue(dbg, ctx, val) {
- evalInTab(dbg, `return_something(${val})`);
- await waitForPaused(dbg);
- + if (val == "0") {
- + await pauseTest()
- + }
- +
- // "Step in" 3 times to get to the point where the debugger can
- // see the return value.
- await stepIn(dbg);
- diff --git a/src/test/integration/utils/index.js b/src/test/integration/utils/index.js
- index f5bfb95..164307c 100644
- --- a/src/test/integration/utils/index.js
- +++ b/src/test/integration/utils/index.js
- @@ -49,7 +49,8 @@ const {
- findSource,
- isPaused,
- isVisibleWithin,
- - getSelector
- + getSelector,
- + pauseTest
- } = require("./shared")
- module.exports = {
- diff --git a/src/test/integration/utils/shared.js b/src/test/integration/utils/shared.js
- index 0d58763..5d0e945 100644
- --- a/src/test/integration/utils/shared.js
- +++ b/src/test/integration/utils/shared.js
- @@ -95,6 +95,20 @@ function info(msg) {
- console.log(message)
- }
- +
- +window.resumeTest = undefined;
- +/**
- + * Pause the test and let you interact with the debugger.
- + * The test can be resumed by invoking `resumeTest` in the console.
- + *
- + * @memberof mochitest
- + * @static
- + */
- +function pauseTest() {
- + info("Test paused. Invoke resumeTest to continue.");
- + return new Promise(resolve => resumeTest = resolve);
- +}
- +
- module.exports = {
- findElement,
- findElementWithSelector,
- @@ -104,5 +118,6 @@ module.exports = {
- getSelector,
- isPaused,
- isVisibleWithin,
- - info
- + info,
- + pauseTest
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement