Documentation ¶
Overview ¶
Package windowarrangementcuj contains helper util and test code for WindowArrangementCUJ.
Index ¶
- func Drag(ctx context.Context, tconn *chrome.TestConn, pc pointer.Context, p DragPoints, ...) error
- func RunClamShell(ctx, closeCtx context.Context, tconn *chrome.TestConn, ui *uiauto.Context, ...) error
- func RunTablet(ctx, closeCtx context.Context, tconn *chrome.TestConn, ui *uiauto.Context, ...) error
- type Connections
- type DragPoints
- type TestParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Drag ¶
func Drag(ctx context.Context, tconn *chrome.TestConn, pc pointer.Context, p DragPoints, duration time.Duration) error
Drag does the specified drag based on the documentation of DragPoints.
func RunClamShell ¶
func RunClamShell(ctx, closeCtx context.Context, tconn *chrome.TestConn, ui *uiauto.Context, pc pointer.Context, act *arc.Activity, withTestVideo arc.ActivityStartOption) error
RunClamShell runs window arrangement cuj for clamshell. We test performance for resizing window, dragging window, maximizing window, minimizing window and split view resizing.
func RunTablet ¶
func RunTablet(ctx, closeCtx context.Context, tconn *chrome.TestConn, ui *uiauto.Context, pc pointer.Context, act *arc.Activity, withTestVideo arc.ActivityStartOption) error
RunTablet runs window arrangement cuj for tablet. Since windows are always maximized in tablet mode, we only test performance for tab dragging and split view resizing.
Types ¶
type Connections ¶
type Connections struct { // Chrome interacts with the currently-running Chrome instance via // the Chrome DevTools protocol: // https://chromedevtools.github.io/devtools-protocol/ Chrome *chrome.Chrome // Source is used to create new chrome.Conn connections. Source ash.ConnSource // TestConn is a connection to ash chrome. TestConn *chrome.TestConn // Cleanup resets everything to a clean state. It only needs to be // called if SetupChrome succeeds. Cleanup func(ctx context.Context) error // CloseBlankTab closes the blank tab that is created when lacros // is started. CloseBlankTab func(ctx context.Context) error // BrowserTestConn is a connection to ash chrome or lacros chrome, // depending on the browser in use. BrowserTestConn *chrome.TestConn // PipVideoTestURL is the URL of the PIP video test page. PipVideoTestURL string // ARC holds resources related to the ARC session. ARC *arc.ARC // ArcVideoActivity is an ARC activity that plays a video, looped. // If you minimize it, it plays the video in PIP. ArcVideoActivity *arc.Activity // WithTestVideo provides the test video URI to ArcVideoActivity. WithTestVideo arc.ActivityStartOption }
Connections holds things that facilitate interaction with the DUT.
func SetupChrome ¶
SetupChrome creates ash-chrome or lacros-chrome based on test parameters.
type DragPoints ¶
DragPoints holds three points, to signify a drag from the first point to the second point, then the third point, and back to the first point.