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

Side by Side Diff: third_party/WebKit/Source/devtools/readme.md

Issue 2637113003: DevTools: dtrun CLI helper (Closed)
Patch Set: rename file Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Chrome DevTools frontend 1 # Chrome DevTools frontend
2 2
3 The client-side of the Chrome DevTools, including all JS & CSS to run the DevToo ls webapp. 3 The client-side of the Chrome DevTools, including all JS & CSS to run the DevToo ls webapp.
4 4
5 It is available on NPM as the [chrome-devtools-frontend](https://www.npmjs.com/p ackage/chrome-devtools-frontend) package. It's not currently available via CJS o r ES2015 modules, so consuming this package in other tools may require [some eff ort](https://github.com/paulirish/devtools-timeline-model/blob/master/index.js). 5 It is available on NPM as the [chrome-devtools-frontend](https://www.npmjs.com/p ackage/chrome-devtools-frontend) package. It's not currently available via CJS o r ES2015 modules, so consuming this package in other tools may require [some eff ort](https://github.com/paulirish/devtools-timeline-model/blob/master/index.js).
6 6
7 #### Package versioning 7 #### Package versioning
8 The version number of the npm package (e.g. `1.0.373466`) refers to the Chromium commit position of latest frontend git commit. It's incremented with every Chro mium commit, however the package is updated roughly daily. 8 The version number of the npm package (e.g. `1.0.373466`) refers to the Chromium commit position of latest frontend git commit. It's incremented with every Chro mium commit, however the package is updated roughly daily.
9 9
10 ### Source code 10 ### Source code
(...skipping 30 matching lines...) Expand all
41 > ``` 41 > ```
42 42
43 ### Hacking 43 ### Hacking
44 * DevTools documentation: [devtools.chrome.com](https://devtools.chrome.com) 44 * DevTools documentation: [devtools.chrome.com](https://devtools.chrome.com)
45 * [Debugging protocol docs](https://developer.chrome.com/devtools/docs/debugger- protocol) and [Chrome Debugging Protocol Viewer](http://chromedevtools.github.io /debugger-protocol-viewer/) 45 * [Debugging protocol docs](https://developer.chrome.com/devtools/docs/debugger- protocol) and [Chrome Debugging Protocol Viewer](http://chromedevtools.github.io /debugger-protocol-viewer/)
46 * [awesome-chrome-devtools](https://github.com/paulirish/awesome-chrome-devtools ): recommended tools and resources 46 * [awesome-chrome-devtools](https://github.com/paulirish/awesome-chrome-devtools ): recommended tools and resources
47 * Contributing to DevTools: [bit.ly/devtools-contribution-guide](http://bit.ly/d evtools-contribution-guide) 47 * Contributing to DevTools: [bit.ly/devtools-contribution-guide](http://bit.ly/d evtools-contribution-guide)
48 48
49 ### Useful Commands 49 ### Useful Commands
50 50
51 Basic: 51 #### Simpler npm commands w/ `dtrun`
52 * `npm run format` - formats your code using clang-format 52 If you want to run these npm commands anywhere in the chromium repo (e.g. in chr omium/src), you'll want to setup our `dtrun` CLI helper.
53 * `npm test` - builds devtools and runs all inspector layout tests 53
54 One-time setup:
55 ```
56 npm run setup-dtrun
57 ```
58
59 Now, you can use any of the following commands by simply doing: `dtrun test`.
60
61 In addition, you no longer need to pass double dashes (e.g. `--`) before you pas s in the flags. So you can do: `dtrun test -d inspector/test.html`.
62
63 #### `npm run format`
64 Formats your code using clang-format
65
66 #### `npm test`
67 Builds devtools and runs all inspector/devtools layout tests.
54 68
55 > Note: If you're using a full chromium checkout and compiled content shell in o ut/Release, then `npm test` uses that. Otherwise, with only a front-end checkout (i.e. cloning from GitHub), then `npm test` will fetch a previously compiled co ntent shell from the cloud (and cache it for future test runs). 69 > Note: If you're using a full chromium checkout and compiled content shell in o ut/Release, then `npm test` uses that. Otherwise, with only a front-end checkout (i.e. cloning from GitHub), then `npm test` will fetch a previously compiled co ntent shell from the cloud (and cache it for future test runs).
56 70
57 Advanced testing: 71 #### `npm test` basics
58 * `npm test -- --fetch-content-shell` - even if you're using a full chromium che ckout 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. 72 ```
59 * `npm test -- -f --child-processes=16` - pass in additional flags to the test h arness 73 # run specific tests
60 * `npm test -- inspector/sources inspector/console` - run specific tests 74 npm test -- inspector/sources inspector/console
61 * `npm test -- inspector/cookie-resource-match.html --debug-devtools` OR `npm ru n debug-test inspector/cookie-resource-match.html` - debug a specific test (non- bundled & minified). You can use "-d" as a shorthand for "--debug-devtools".
62 75
63 #### Development 76 # debug a specific test. Any one of:
77 npm run debug-test inspector/cookie-resource-match.html
78 npm test -- --debug-devtools inspector/cookie-resource-match.html
79 npm test -- -d inspector/cookie-resource-match.html
80
81 # pass in additional flags to the test harness
82 npm test -- -f --child-processes=16
83
84 # ...for example, use a higher test timeout
85 npm test -- --time-out-ms=6000000 <test_path>
86 ```
87
88 > **Tip**: [Learn about the test harness flags](https://chromium.googlesource.co m/chromium/src/+/master/docs/testing/layout_tests.md#Test-Harness-Options)
89
90 #### `--fetch-content-shell`
91 ```
92 # If you're using a full chromium checkout and have a compiled content shell,
93 # this will fetch a pre-compiled content shell. This is useful if you
94 # haven't compiled your content shell recently
95 npm test -- --fetch-content-shell
96 ```
97
98 ### Development
64 * All devtools commits: [View the log], [RSS feed] or [@DevToolsCommits] on Twit ter 99 * All devtools commits: [View the log], [RSS feed] or [@DevToolsCommits] on Twit ter
65 * [All open DevTools tickets] on crbug.com 100 * [All open DevTools tickets] on crbug.com
66 * File a new DevTools ticket: [new.crbug.com](https://bugs.chromium.org/p/chromi um/issues/entry?labels=OS-All,Type-Bug,Pri-2&components=Platform%3EDevTools) 101 * File a new DevTools ticket: [new.crbug.com](https://bugs.chromium.org/p/chromi um/issues/entry?labels=OS-All,Type-Bug,Pri-2&components=Platform%3EDevTools)
67 * Code reviews mailing list: [devtools-reviews@chromium.org] 102 * Code reviews mailing list: [devtools-reviews@chromium.org]
68 103
69 ### Getting in touch 104 ### Getting in touch
70 * [@ChromeDevTools] on Twitter 105 * [@ChromeDevTools] on Twitter
71 * Chrome DevTools mailing list: [groups.google.com/forum/google-chrome-developer -tools](https://groups.google.com/forum/#!forum/google-chrome-developer-tools) 106 * Chrome DevTools mailing list: [groups.google.com/forum/google-chrome-developer -tools](https://groups.google.com/forum/#!forum/google-chrome-developer-tools)
72 107
73 [devtools-reviews@chromium.org]: https://groups.google.com/a/chromium.org/foru m/#!forum/devtools-reviews 108 [devtools-reviews@chromium.org]: https://groups.google.com/a/chromium.org/foru m/#!forum/devtools-reviews
74 [RSS feed]: https://feeds.peter.sh/chrome-devtools/ 109 [RSS feed]: https://feeds.peter.sh/chrome-devtools/
75 [View the log]: https://chromium.googlesource.com/chromium/src/third_party/Web Kit/Source/devtools/+log/master 110 [View the log]: https://chromium.googlesource.com/chromium/src/third_party/Web Kit/Source/devtools/+log/master
76 [@ChromeDevTools]: http://twitter.com/ChromeDevTools 111 [@ChromeDevTools]: http://twitter.com/ChromeDevTools
77 [@DevToolsCommits]: http://twitter.com/DevToolsCommits 112 [@DevToolsCommits]: http://twitter.com/DevToolsCommits
78 [all open DevTools tickets]: https://bugs.chromium.org/p/chromium/issues/list? can=2&q=component%3APlatform%3EDevTools&sort=&groupby=&colspec=ID+Stars+Owner+Su mmary+Modified+Opened 113 [all open DevTools tickets]: https://bugs.chromium.org/p/chromium/issues/list? can=2&q=component%3APlatform%3EDevTools&sort=&groupby=&colspec=ID+Stars+Owner+Su mmary+Modified+Opened
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698