Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Issue 2413563002: DevTools: add "npm test" to run tests by fetching content shells (Closed)

Created:
4 years, 2 months ago by chenwilliam
Modified:
4 years, 2 months ago
Reviewers:
dgozman
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, pfeldman, kozyatinskiy+blink_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: add "npm test" to run tests by fetching content shells Running "npm test" from /devtools fetches an uploaded content shell (which is cached) and runs devtools layout tests. This allows developers, especially external contributors, to run our tests without compiling. API: * "npm test" - builds devtools and run all inspector layout tests (primary command) * "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) * "npm run test:build" - only builds devtools (in debug mode) * "npm run test:run" - only runs devtools tests This currently works w/ a full-checkout, but I plan on working to enable running devtools layout tests w/ only a frontend checkout. BUG=654486 Committed: https://crrev.com/605fd97ead89705d29fa86c7b9885db159a35f8a Cr-Commit-Position: refs/heads/master@{#426024}

Patch Set 1 #

Patch Set 2 : getContentShellBinaryRelativePath #

Patch Set 3 : fix binary path #

Patch Set 4 : Fixes #

Patch Set 5 : Mac fix #

Patch Set 6 : nits #

Total comments: 2

Patch Set 7 : address CL feedback #

Patch Set 8 : nits #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+360 lines, -3 lines) Patch
M third_party/WebKit/Source/devtools/.gitignore View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/package.json View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
A third_party/WebKit/Source/devtools/scripts/npm_test.js View 1 2 3 4 5 6 7 1 chunk +263 lines, -0 lines 2 comments Download
A third_party/WebKit/Source/devtools/scripts/unzip.py View 1 2 3 4 5 1 chunk +20 lines, -0 lines 2 comments Download
M third_party/WebKit/Source/devtools/scripts/utils.js View 1 2 3 2 chunks +73 lines, -2 lines 0 comments Download

Messages

Total messages: 14 (6 generated)
chenwilliam
PTAL. I tested it on Linux, Mac, and Windows and it seems to work OK.
4 years, 2 months ago (2016-10-14 20:08:26 UTC) #3
dgozman
Let's have separate "npm build" and "npm runtests", with a combined "npm test" which does ...
4 years, 2 months ago (2016-10-14 21:40:31 UTC) #4
chenwilliam
PTAL. Added commands to allow users to separately build devtools and run tests (updated description). ...
4 years, 2 months ago (2016-10-17 19:01:28 UTC) #6
dgozman
lgtm https://codereview.chromium.org/2413563002/diff/140001/third_party/WebKit/Source/devtools/scripts/npm_test.js File third_party/WebKit/Source/devtools/scripts/npm_test.js (right): https://codereview.chromium.org/2413563002/diff/140001/third_party/WebKit/Source/devtools/scripts/npm_test.js#newcode107 third_party/WebKit/Source/devtools/scripts/npm_test.js:107: var positionsListURL = `http://commondatastorage.googleapis.com/chromium-browser-snapshots/?delimiter=/&prefix=${PLATFORM}/&marker=${PLATFORM}/${previousPosition}/`; Does one need any ...
4 years, 2 months ago (2016-10-17 19:13:51 UTC) #7
chenwilliam
Responses to the questions. https://chromiumcodereview.appspot.com/2413563002/diff/140001/third_party/WebKit/Source/devtools/scripts/npm_test.js File third_party/WebKit/Source/devtools/scripts/npm_test.js (right): https://chromiumcodereview.appspot.com/2413563002/diff/140001/third_party/WebKit/Source/devtools/scripts/npm_test.js#newcode107 third_party/WebKit/Source/devtools/scripts/npm_test.js:107: var positionsListURL = `http://commondatastorage.googleapis.com/chromium-browser-snapshots/?delimiter=/&prefix=${PLATFORM}/&marker=${PLATFORM}/${previousPosition}/`; On ...
4 years, 2 months ago (2016-10-18 18:13:18 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2413563002/140001
4 years, 2 months ago (2016-10-18 18:47:14 UTC) #10
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 2 months ago (2016-10-18 19:37:04 UTC) #12
commit-bot: I haz the power
4 years, 2 months ago (2016-10-21 13:02:20 UTC) #14
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/605fd97ead89705d29fa86c7b9885db159a35f8a
Cr-Commit-Position: refs/heads/master@{#426024}

Powered by Google App Engine
This is Rietveld 408576698