Chrome on ChromeOS is built on a mix of code sourced from Chrome on Linux and Chrome on Windows. Much of the user interface code is shared with Chrome on Windows. As such, if you make a change to Chrome on Windows you may find your changes affect Chrome on ChromeOS. Fortunately to test the effect of your changes you don't have to build all of ChromeOS, you can just build Chrome for ChromeOS directly on Linux.
Running Chromium on your local machine
If you plan to test the Chromium build on your dev machine and not a ChromeOS device run:
Now, once you build, you will build with ChromeOS features turned on.
- When you build ChromeOS Chromium, you'll be using the TOOLKIT_VIEWS frontend just like windows, so the files you'll probably want are in src/ui/views and src/chrome/browser/ui/views, not src/chrome/browser/ui/gtk!
- If chromeos=1 is specified, then toolkit_views=0 must not be specified.
- The ChromeOS build requires a functioning GL so if you plan on testing it through Chrome Remote Desktop you might face drawing problems (e.g. Aura window not painting anything). Possible remedies:
- --ui-enable-software-compositing --ui-disable-threaded-compositing
- --use-gl=osmesa, but it's ultra slow, and you'll have to build osmesa yourself.
- ... or just don't use Remote Desktop. :)
- Note the underscore in the GYP_DEFINES variable name, as people sometimes mistakenly write it GYPDEFINES.
To specify a logged in user:
Signing in as a specific user is useful for debugging features like sync that require a logged in user.
- For first run, add the following options to the command line: --user-data-dir=/tmp/chrome --login-profile=user --login-manager
- Go through the out-of-the-box UX and sign in as email@example.com
- For subsequent runs, add the following to the command line: --user-data-dir=/tmp/chrome --login-profile=user --firstname.lastname@example.org.
Running Chromium on a ChromeOS device
Look at the ChromiumOS documentation
for the official flow for doing this - you will need to check out the ChromiumOS sources and create a chroot.