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