tablet_mode¶
Source code: tablet_mode.py
Tests that certain conditions are met when in tablet mode.
Description¶
Currently, it check that the lid switch is not triggered and tablet mode event is triggered and in correct state.
Turning devices into tablet mode exercises the GMR sensor and the accelerometer.
Test Procedure¶
If prompt_flip_tablet is set:
The operator flips the device to make it enter tablet mode.
The operator clicks the button by using touch screen or external mouse.
If prompt_flip_notebook is set:
The operator flips the device to make it enter notebook mode.
The operator presses the space key.
Dependency¶
cros.factory.external.py_lib.evdev
cros.factory.test.utils.evdev_utils
Examples¶
To run the test, add this in test list:
{
"pytest_name": "tablet_mode",
"args": {
"prompt_flip_tablet": true,
"prompt_flip_notebook": true
}
}
Set lid_filter to choose the lid sensor explicitly:
{
"pytest_name": "tablet_mode",
"args": {
"prompt_flip_tablet": true,
"prompt_flip_notebook": true,
"lid_filter": "Lid Switch"
}
}
You can also use the ScreenRotation, which is defined in generic_common.test_list.json.
Test Arguments¶
Name |
Type |
Description |
---|---|---|
timeout_secs |
int |
(optional; default: |
lid_filter |
int, str, None |
(optional; default: |
tablet_filter |
int, str, None |
(optional; default: |
prompt_flip_tablet |
bool |
(optional; default: |
prompt_flip_notebook |
bool |
(optional; default: |