blob: 05f69285a08bfc1cea7c79e9b5fa914d89f184fb [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
Anastasia Helfinstein4bb719552019-11-21 19:02:5116Code location: ```chrome/browser/resources/chromeos/accessibility/chromevox```
dmazzoni2f489752017-02-16 03:39:1617
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
Anastasia Helfinstein4bb719552019-11-21 19:02:5139chrome/browser/resources/chromeos/accessibility/chromevox/BUILD.gn, or by using
40a debug build.
dmazzoni2f489752017-02-16 03:39:1641
42In a debug build or with chromevox_compress_js off, the unflattened files in the
Anastasia Helfinstein4bb719552019-11-21 19:02:5143Chrome out directory
44(e.g. out/Release/resources/chromeos/accessibility/chromevox/). Now you
dmazzoni2f489752017-02-16 03:39:1645can hack directly on the copy of ChromeVox in out/ and toggle ChromeVox to pick
46up your changes (via Ctrl+Alt+Z).
47
48### Fixing bugs
49
50The easiest way to debug ChromeVox is from an external browser. Start Chrome
51with this command-line flag:
52
53```out/Release/chrome --remote-debugging-port=9222```
54
55Now open http://localhost:9222 in a separate instance of the browser, and debug the ChromeVox extension background page from there.
56
David Landelld341c8deb2017-08-24 16:14:0057Another option is to use emacs indium (available through M-x
dmazzoni2f489752017-02-16 03:39:1658package-list-packages).
59
60It also talks to localhost:9222 but integrates more tightly into emacs instead.
61
62Another option is to use the built-in developer console. Go to the
63ChromeVox options page with Search+Shift+o, o; then, substitute the
64options.html path with background.html”, and then open up the
65inspector.
66
67### Running tests
68
James Cook1380ad162018-10-25 00:51:1969Build the browser_tests target. To run lots of tests in parallel, run it like
70this:
dmazzoni2f489752017-02-16 03:39:1671
James Cook1380ad162018-10-25 00:51:1972```
73out/Release/browser_tests --test-launcher-jobs=20 --gtest_filter=ChromeVox*
74```
dmazzoni2f489752017-02-16 03:39:1675
James Cook1380ad162018-10-25 00:51:1976Use a narrower test filter if you only want to run some of the tests. For
77example, most of the ChromeVox Next tests have "E2E" in them (for "end-to-end"),
78so to only run those:
dmazzoni2f489752017-02-16 03:39:1679
James Cook1380ad162018-10-25 00:51:1980```out/Release/browser_tests --test-launcher-jobs=20 --gtest_filter="*E2E*"```