Commit 3a6fb437 authored by Toby Huang's avatar Toby Huang Committed by Commit Bot

Mention LoggedInUserMixin in user_types.md documentation

This documentation-only CL modifies user_types.md to mention
LoggedInUserMixin as a convenient way to log in as child user for
browser tests.

Bug: None
Change-Id: Ib6d3833600bb1fcd74e1fee61e0d68446dbee7c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1911219Reviewed-by: default avatarAga Wronska <agawronska@chromium.org>
Commit-Queue: Toby Huang <tobyhuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714524}
parent dca621cb
...@@ -13,7 +13,6 @@ enterprise user types, see ...@@ -13,7 +13,6 @@ enterprise user types, see
Regular users that were registered using their GAIA account. Regular users that were registered using their GAIA account.
## Child users ## Child users
Users that logged in using Users that logged in using
...@@ -52,6 +51,8 @@ unnecessary time to the test runtime. To avoid this, tests should: ...@@ -52,6 +51,8 @@ unnecessary time to the test runtime. To avoid this, tests should:
* If the test user is logged in using `LoginManagerMixin`, the injected * If the test user is logged in using `LoginManagerMixin`, the injected
`UserContext` has to have the refresh token matching the token passed to `UserContext` has to have the refresh token matching the token passed to
`FakeGaiaMixin`. `FakeGaiaMixin`.
* Note that `LoggedInUserMixin` is a compound helper mixin that conveniently
packages the mixins mentioned above into an easy-to-use interface.
## Guest ## Guest
...@@ -62,7 +63,7 @@ persisted after the guest session ends. ...@@ -62,7 +63,7 @@ persisted after the guest session ends.
To test guest session state, use `GuestSessionMixin` - this will set up To test guest session state, use `GuestSessionMixin` - this will set up
appropriate guest session flags. appropriate guest session flags.
Testing guest user login is more complicated, as guest login required Chrome Testing guest user login is more complicated, as guest login requires Chrome
restart. The test will require two parts: restart. The test will require two parts:
* `PRE_BrowserTest` test that requests login * `PRE_BrowserTest` test that requests login
* `BrowserTest` that can test guest session state * `BrowserTest` that can test guest session state
...@@ -70,4 +71,3 @@ restart. The test will require two parts: ...@@ -70,4 +71,3 @@ restart. The test will require two parts:
To properly set up and preserve Chrome flags between sessions runs, use To properly set up and preserve Chrome flags between sessions runs, use
`LoginManagerMixin`, and set it up using `LoginManagerMixin`, and set it up using
`LoginManagerMixin::set_session_restore_enabled()` `LoginManagerMixin::set_session_restore_enabled()`
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment