blob: c45edd559fb02a151a6a034a81d57b390d9c8436 [file] [log] [blame] [view]
dmazzoni2f489752017-02-16 03:39:161# ChromeVox (for developers)
2
3ChromeVox is the built-in screen reader on Chrome OS. It was originally
4developed as a separate extension but now the code lives inside of the Chromium
5tree and it's built as part of Chrome OS.
6
David Tsengc4b43012018-04-11 04:10:277NOTE: ChromeVox ships also as an extension on the Chrome webstore. This version
8of ChromeVox is known as ChromeVox Classic and is loosely related to ChromeVox
9(on Chrome OS). All references to ChromeVox relate only to ChromeVox on Chrome
10OS.
11
12To start or stop ChromeVox, press Ctrl+Alt+Z at any time.
dmazzoni2f489752017-02-16 03:39:1613
14## Developer Info
15
16Code location: ```chrome/browser/resources/chromeos/chromevox```
17
18Ninja target: it's built as part of "chrome", but you can build and run
James Cook1380ad162018-10-25 00:51:1919browser_tests to test it (Chrome OS target only - you must have target_os =
dmazzoni2f489752017-02-16 03:39:1620"chromeos" in your GN args first).
21
22## Developing On Linux
23
24ChromeVox for Chrome OS development is done on Linux.
25
26See [ChromeVox on Desktop Linux](chromevox_on_desktop_linux.md)
27for more information.
28
dmazzoni2f489752017-02-16 03:39:1629## Debugging ChromeVox
30
31There are options available that may assist in debugging ChromeVox. Here are a
32few use cases.
33
34### Feature development
35
36When developing a new feature, it may be helpful to save time by not having to
37go through a compile cycle. This can be achieved by setting
38```chromevox_compress_js``` to 0 in
39chrome/browser/resources/chromeos/chromevox/BUILD.gn, or by using a debug build.
40
41In a debug build or with chromevox_compress_js off, the unflattened files in the
42Chrome out directory (e.g. out/Release/resources/chromeos/chromevox/). Now you
43can hack directly on the copy of ChromeVox in out/ and toggle ChromeVox to pick
44up your changes (via Ctrl+Alt+Z).
45
46### Fixing bugs
47
48The easiest way to debug ChromeVox is from an external browser. Start Chrome
49with this command-line flag:
50
51```out/Release/chrome --remote-debugging-port=9222```
52
53Now open http://localhost:9222 in a separate instance of the browser, and debug the ChromeVox extension background page from there.
54
David Landelld341c8deb2017-08-24 16:14:0055Another option is to use emacs indium (available through M-x
dmazzoni2f489752017-02-16 03:39:1656package-list-packages).
57
58It also talks to localhost:9222 but integrates more tightly into emacs instead.
59
60Another option is to use the built-in developer console. Go to the
61ChromeVox options page with Search+Shift+o, o; then, substitute the
62options.html path with background.html”, and then open up the
63inspector.
64
65### Running tests
66
James Cook1380ad162018-10-25 00:51:1967Build the browser_tests target. To run lots of tests in parallel, run it like
68this:
dmazzoni2f489752017-02-16 03:39:1669
James Cook1380ad162018-10-25 00:51:1970```
71out/Release/browser_tests --test-launcher-jobs=20 --gtest_filter=ChromeVox*
72```
dmazzoni2f489752017-02-16 03:39:1673
James Cook1380ad162018-10-25 00:51:1974Use a narrower test filter if you only want to run some of the tests. For
75example, most of the ChromeVox Next tests have "E2E" in them (for "end-to-end"),
76so to only run those:
dmazzoni2f489752017-02-16 03:39:1677
James Cook1380ad162018-10-25 00:51:1978```out/Release/browser_tests --test-launcher-jobs=20 --gtest_filter="*E2E*"```