summaryrefslogtreecommitdiff
path: root/test/sequential
diff options
context:
space:
mode:
authorGuy Bedford <guybedford@gmail.com>2018-01-17 00:35:54 +0200
committerGuy Bedford <guybedford@gmail.com>2018-01-22 18:39:21 +0200
commite7ff00d0c52ad7deefe8be4a6a293d15fd3fca7b (patch)
tree85ba33781747ad30295f491e07232e087b8f2662 /test/sequential
parenta65b0b90c96546a33b0c9d52c9c7024df201d6b1 (diff)
downloadandroid-node-v8-e7ff00d0c52ad7deefe8be4a6a293d15fd3fca7b.tar.gz
android-node-v8-e7ff00d0c52ad7deefe8be4a6a293d15fd3fca7b.tar.bz2
android-node-v8-e7ff00d0c52ad7deefe8be4a6a293d15fd3fca7b.zip
inspector: --inspect-brk for es modules
Reworked rebase of PR #17360 with feedback PR-URL: https://github.com/nodejs/node/pull/18194 Fixes: https://github.com/nodejs/node/issues/17340 Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/sequential')
-rw-r--r--test/sequential/test-inspector-async-hook-setup-at-inspect-brk.js1
-rw-r--r--test/sequential/test-inspector-async-hook-setup-at-signal.js1
-rw-r--r--test/sequential/test-inspector-async-stack-traces-promise-then.js1
-rw-r--r--test/sequential/test-inspector-async-stack-traces-set-interval.js1
-rw-r--r--test/sequential/test-inspector-break-e.js1
-rw-r--r--test/sequential/test-inspector-break-when-eval.js1
-rw-r--r--test/sequential/test-inspector-debug-brk-flag.js6
-rw-r--r--test/sequential/test-inspector-debug-end.js1
-rw-r--r--test/sequential/test-inspector-exception.js1
-rw-r--r--test/sequential/test-inspector-ip-detection.js1
-rw-r--r--test/sequential/test-inspector-not-blocked-on-idle.js1
-rw-r--r--test/sequential/test-inspector-scriptparsed-context.js1
-rw-r--r--test/sequential/test-inspector-stop-profile-after-done.js1
-rw-r--r--test/sequential/test-inspector.js13
14 files changed, 21 insertions, 10 deletions
diff --git a/test/sequential/test-inspector-async-hook-setup-at-inspect-brk.js b/test/sequential/test-inspector-async-hook-setup-at-inspect-brk.js
index 980e9e4d46..e0c3b4dcb8 100644
--- a/test/sequential/test-inspector-async-hook-setup-at-inspect-brk.js
+++ b/test/sequential/test-inspector-async-hook-setup-at-inspect-brk.js
@@ -1,3 +1,4 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
diff --git a/test/sequential/test-inspector-async-hook-setup-at-signal.js b/test/sequential/test-inspector-async-hook-setup-at-signal.js
index 5ff7dec947..e0b87b0ebb 100644
--- a/test/sequential/test-inspector-async-hook-setup-at-signal.js
+++ b/test/sequential/test-inspector-async-hook-setup-at-signal.js
@@ -1,3 +1,4 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
diff --git a/test/sequential/test-inspector-async-stack-traces-promise-then.js b/test/sequential/test-inspector-async-stack-traces-promise-then.js
index 9ed61d5ae1..b5cb651ff4 100644
--- a/test/sequential/test-inspector-async-stack-traces-promise-then.js
+++ b/test/sequential/test-inspector-async-stack-traces-promise-then.js
@@ -1,3 +1,4 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
diff --git a/test/sequential/test-inspector-async-stack-traces-set-interval.js b/test/sequential/test-inspector-async-stack-traces-set-interval.js
index e778bfc802..326032d40b 100644
--- a/test/sequential/test-inspector-async-stack-traces-set-interval.js
+++ b/test/sequential/test-inspector-async-stack-traces-set-interval.js
@@ -1,3 +1,4 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
diff --git a/test/sequential/test-inspector-break-e.js b/test/sequential/test-inspector-break-e.js
index 9ae47253f4..8db403ad2c 100644
--- a/test/sequential/test-inspector-break-e.js
+++ b/test/sequential/test-inspector-break-e.js
@@ -1,3 +1,4 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
diff --git a/test/sequential/test-inspector-break-when-eval.js b/test/sequential/test-inspector-break-when-eval.js
index e5d01cb189..b14e01a301 100644
--- a/test/sequential/test-inspector-break-when-eval.js
+++ b/test/sequential/test-inspector-break-when-eval.js
@@ -1,3 +1,4 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
diff --git a/test/sequential/test-inspector-debug-brk-flag.js b/test/sequential/test-inspector-debug-brk-flag.js
index 235e7043d8..61eb4f97c6 100644
--- a/test/sequential/test-inspector-debug-brk-flag.js
+++ b/test/sequential/test-inspector-debug-brk-flag.js
@@ -1,11 +1,11 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
const assert = require('assert');
-const { mainScriptPath,
- NodeInstance } = require('../common/inspector-helper.js');
+const { NodeInstance } = require('../common/inspector-helper.js');
async function testBreakpointOnStart(session) {
const commands = [
@@ -24,7 +24,7 @@ async function testBreakpointOnStart(session) {
];
session.send(commands);
- await session.waitForBreakOnLine(0, mainScriptPath);
+ await session.waitForBreakOnLine(0, session.scriptPath());
}
async function runTests() {
diff --git a/test/sequential/test-inspector-debug-end.js b/test/sequential/test-inspector-debug-end.js
index effef9f233..dadee26258 100644
--- a/test/sequential/test-inspector-debug-end.js
+++ b/test/sequential/test-inspector-debug-end.js
@@ -1,3 +1,4 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
diff --git a/test/sequential/test-inspector-exception.js b/test/sequential/test-inspector-exception.js
index 743742f50f..3f83b37c72 100644
--- a/test/sequential/test-inspector-exception.js
+++ b/test/sequential/test-inspector-exception.js
@@ -1,3 +1,4 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
const fixtures = require('../common/fixtures');
diff --git a/test/sequential/test-inspector-ip-detection.js b/test/sequential/test-inspector-ip-detection.js
index f7dee4494d..a69a57f55f 100644
--- a/test/sequential/test-inspector-ip-detection.js
+++ b/test/sequential/test-inspector-ip-detection.js
@@ -1,3 +1,4 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
diff --git a/test/sequential/test-inspector-not-blocked-on-idle.js b/test/sequential/test-inspector-not-blocked-on-idle.js
index 68e4eaaa57..3b1befe35d 100644
--- a/test/sequential/test-inspector-not-blocked-on-idle.js
+++ b/test/sequential/test-inspector-not-blocked-on-idle.js
@@ -1,3 +1,4 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
diff --git a/test/sequential/test-inspector-scriptparsed-context.js b/test/sequential/test-inspector-scriptparsed-context.js
index f295d737da..abffbfe5fc 100644
--- a/test/sequential/test-inspector-scriptparsed-context.js
+++ b/test/sequential/test-inspector-scriptparsed-context.js
@@ -1,3 +1,4 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
diff --git a/test/sequential/test-inspector-stop-profile-after-done.js b/test/sequential/test-inspector-stop-profile-after-done.js
index d0285df175..7069e49025 100644
--- a/test/sequential/test-inspector-stop-profile-after-done.js
+++ b/test/sequential/test-inspector-stop-profile-after-done.js
@@ -1,3 +1,4 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
diff --git a/test/sequential/test-inspector.js b/test/sequential/test-inspector.js
index 992a12e902..c34c953006 100644
--- a/test/sequential/test-inspector.js
+++ b/test/sequential/test-inspector.js
@@ -1,12 +1,11 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
const assert = require('assert');
-const { mainScriptPath,
- readMainScriptSource,
- NodeInstance } = require('../common/inspector-helper.js');
+const { NodeInstance } = require('../common/inspector-helper.js');
function checkListResponse(response) {
assert.strictEqual(1, response.length);
@@ -75,7 +74,7 @@ async function testBreakpointOnStart(session) {
];
await session.send(commands);
- await session.waitForBreakOnLine(0, mainScriptPath);
+ await session.waitForBreakOnLine(0, session.scriptPath());
}
async function testBreakpoint(session) {
@@ -83,7 +82,7 @@ async function testBreakpoint(session) {
const commands = [
{ 'method': 'Debugger.setBreakpointByUrl',
'params': { 'lineNumber': 5,
- 'url': mainScriptPath,
+ 'url': session.scriptPath(),
'columnNumber': 0,
'condition': ''
}
@@ -94,11 +93,11 @@ async function testBreakpoint(session) {
const { scriptSource } = await session.send({
'method': 'Debugger.getScriptSource',
'params': { 'scriptId': session.mainScriptId } });
- assert(scriptSource && (scriptSource.includes(readMainScriptSource())),
+ assert(scriptSource && (scriptSource.includes(session.script())),
`Script source is wrong: ${scriptSource}`);
await session.waitForConsoleOutput('log', ['A message', 5]);
- const paused = await session.waitForBreakOnLine(5, mainScriptPath);
+ const paused = await session.waitForBreakOnLine(5, session.scriptPath());
const scopeId = paused.params.callFrames[0].scopeChain[0].object.objectId;
console.log('[test]', 'Verify we can read current application state');