Commit e4fe8017 authored by chenwilliam's avatar chenwilliam Committed by Commit bot

DevTools: fix --debug-devtools flag for npm test

Fixes a regression where --debug-devtools erroneously no longer used the debug version
of devtools (e.g. minified / unbundled).

Also added an npm command to debug test: "npm run debug-test inspector/test-name.html"

BUG=none

Review-Url: https://codereview.chromium.org/2611843003
Cr-Commit-Position: refs/heads/master@{#441763}
parent 75635809
......@@ -6,6 +6,7 @@
"chrome": "node scripts/chrome_debug_launcher/launch_chrome.js",
"server": "node scripts/hosted_mode/server.js",
"test": "node scripts/npm_test.js",
"debug-test": "node scripts/npm_test.js --debug-devtools",
"lint": "eslint front_end",
"format": "node scripts/format.js",
"closure": "python scripts/compile_frontend.py"
......
......@@ -58,7 +58,7 @@ Advanced testing:
* `npm test -- --fetch-content-shell` - even if you're using a full chromium checkout and have a compiled content shell, this will fetch a pre-compiled content shell. This is useful if you haven't compiled your content shell recently.
* `npm test -- -f --child-processes=16` - pass in additional flags to the test harness
* `npm test -- inspector/sources inspector/console` - run specific tests
* `npm test -- inspector/cookie-resource-match.html --debug-devtools` - debug a specific test (non-bundled & minified). You can use "-d" as a shorthand for "--debug-devtools".
* `npm test -- inspector/cookie-resource-match.html --debug-devtools` OR `npm run debug-test inspector/cookie-resource-match.html` - debug a specific test (non-bundled & minified). You can use "-d" as a shorthand for "--debug-devtools".
#### Development
* All devtools commits: [View the log], [RSS feed] or [@DevToolsCommits] on Twitter
......
......@@ -233,6 +233,8 @@ function runTests(buildDirectoryPath, useDebugDevtools)
]);
if (useDebugDevtools) {
testArgs.push("--additional-driver-flag=--debug-devtools");
} else {
console.log("TIP: You can debug a test using: npm run debug-test inspector/test-name.html")
}
if (IS_DEBUG_ENABLED) {
testArgs.push("--additional-driver-flag=--remote-debugging-port=9222");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment