blob: 73ff8957cb9878d5ec0ae1174a75a6aefa9cb37d [file] [log] [blame]
// Copyright 2021 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package ui
import (
func init() {
Func: TabSwitchCUJRecorder2,
Desc: "Run tab-switching CUJ test in chromewpr recording mode",
Contacts: []string{"", "", "", ""},
SoftwareDeps: []string{"chrome"},
Timeout: 30 * time.Minute,
Params: []testing.Param{
Name: "local",
Val: "local",
Pre: wpr.RecordMode("/tmp/archive.wprgo"),
}, {
Name: "remote",
Val: "remote",
// Remote WPR proxy is set up manually. Use RemoteReplayMode() to
// get remote WPR address and start chrome accordingly.
Pre: wpr.RemoteReplayMode(),
Vars: []string{
// The following vars are only used by remote mode.
// TabSwitchCUJRecorder2 runs tab-switching CUJ test in chrome wpr recording mode. It will
// record the premium scenario, which can be used for basic and plus testing as well.
// The test can either do recording on a DUT local WPR server, or a remote WPR server.
// Local WPR server will be set up automatically by the preconditon.
// Steps to do remote recording:
// 1. Manually run wpr in record mode on a remote server.
// 2. Run this test.
// 3. Manually terminate wpr to output a record file on remote server.
// 4. Check remote wpr configureation to find the record file
func TabSwitchCUJRecorder2(ctx context.Context, s *testing.State) {
cr, ok := s.PreValue().(*chrome.Chrome)
if !ok {
s.Fatal("Failed to connect to Chrome")
// is the dut tablet or not shouldn't affect to recording web content
tabswitchcuj.Run2(ctx, s, cr, tabswitchcuj.Record, false)