OLD | NEW |
(Empty) | |
| 1 # Running layout tests using the content shell |
| 2 |
| 3 ## Basic usage |
| 4 |
| 5 Layout tests can be run with `content_shell`. To just dump the render tree, use |
| 6 the `--run-layout-test` flag: |
| 7 |
| 8 ```bash |
| 9 out/Default/content_shell --run-layout-test foo.html |
| 10 ``` |
| 11 |
| 12 ### Compiling |
| 13 |
| 14 If you want to run layout tests, |
| 15 [build the target `blink_tests`](layout_tests.md); this includes all the other |
| 16 binaries required to run the tests. |
| 17 |
| 18 ### Running |
| 19 |
| 20 You can run layout tests using `run-webkit-tests` (in |
| 21 `src/third_party/WebKit/Tools/Scripts`). |
| 22 |
| 23 ```bash |
| 24 third_party/WebKit/Tools/Scripts/run-webkit-tests storage/indexeddb |
| 25 ``` |
| 26 |
| 27 or execute the shell directly: |
| 28 |
| 29 ```bash |
| 30 out/Default/content_shell --remote-debugging-port=9222 |
| 31 ``` |
| 32 |
| 33 This allows you see how your changes look in Chromium, and even connect with |
| 34 devtools (by going to http://127.0.0.1:9222 from another window) to inspect your |
| 35 freshly compiled Blink. |
| 36 |
| 37 *** note |
| 38 On the Mac, use `Content Shell.app`, not `content_shell`. |
| 39 |
| 40 ```bash |
| 41 out/Default/Content\ Shell.app/Contents/MacOS/Content\ Shell --remote-debugging-
port=9222 |
| 42 ``` |
| 43 *** |
| 44 |
| 45 ### Debugging Renderer Crashes |
| 46 |
| 47 To debug a renderer crash, ask Content Shell to wait for you to attach a |
| 48 debugger once it spawns a renderer process by adding the |
| 49 `--renderer-startup-dialog` flag: |
| 50 |
| 51 ```bash |
| 52 out/Default/content_shell --renderer-startup-dialog |
| 53 ``` |
| 54 |
| 55 Debugging workers and other subprocesses is simpler with |
| 56 `--wait-for-debugger-children`, which can have one of two values: `plugin` or |
| 57 `renderer`. |
| 58 |
| 59 ## Future Work |
| 60 |
| 61 ### Reusing existing testing objects |
| 62 |
| 63 To avoid writing (and maintaining!) yet another test controller, it is desirable |
| 64 to reuse an existing test controller. A possible solution would be to change |
| 65 DRT's test controller to not depend on DRT's implementation of the Blink |
| 66 objects, but rather on the Blink interfaces. In addition, we would need to |
| 67 extract an interface from the test shell object that can be implemented by |
| 68 content shell. This would allow for directly using DRT's test controller in |
| 69 content shell. |
OLD | NEW |