ChromeOS Personalization features interact differently with different user types. It is important for feature development to consider how the different user types will be affected.
see: //components/user_manager/user_type.h
For a more in depth explanation, see:
Profiles, Sessions, Users, and more for ChromeOS Personalization
Personalization App takes a layered approach to testing. There are C++ unit tests, javascript component browser tests, and javascript full-app browsertests.
//chrome/browser/ash/system_web_apps/apps/personalization_app/*unittest.cc
unit_tests --gtest_filter=*PersonalizationApp*
personalization_app_component_browsertest.cc
browser_tests --gtest_filter=*PersonalizationAppComponent*
//chrome/test/data/webui/chromeos/personalization_app/*
personalization_app_mojom_banned_mocha_test_base.h
will immediately fail the testpersonalization_app_controller_browsertest.cc
browser_tests --gtest_filter=*PersonalizationAppController*
personalization_app_test.ts
browser_tests --gtest_filter=*PersonalizationAppBrowserTest
personalization_app_mocha_test_base.h
TestWallpaperFetcherDelegate
FakePersonalizationApp{Ambient,KeyboardBacklight,User}Provider
personalization_app_integration_browsertest.cc
browser_tests --gtest_filter=*PersonalizationAppIntegration*
//ash/test/pixel/README.md
for more informationbrowser_tests --gtest_filter=*PersonalizationAppIntegrationPixel* --skia-gold-local-png-write-directory=/tmp/skia_gold/ --enable-pixel-output-in-tests --browser-ui-tests-verify-pixels
Inspect the output pngs generated in /tmp/skia_gold/*
to make sure that the test is setting up the correct UI state.
In CQ these tests do not actually verify pixel output as part of the mainline browser_tests
step in linux-chromeos-rel
. However, they still go through the setup to make sure there are no crashes while preparing the UI. Full pixel verification will run as part of pixel_experimental_browser_tests
which passes the necessary additional argument --browser-ui-tests-verify-pixels
.
debugger;
as a breakpoint.test("test name", () => ...) => test.only("test name"...)
.--gtest_repeat=1000 --gtest_break_on_failure
.tsconfig.json
using helper script. Please follow the help doc in the header of the helper script.${PATH_TO_CHROMIUM}/src/.git/info/exclude
and add these lines/ash/webui/personalization_app/resources/tsconfig.json /chrome/test/data/webui/chromeos/personalization_app/tsconfig.json