blob: e6e06daa44445395fec8dc823c100990dc11adc0 [file] [log] [blame]
// Copyright 2019 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 pre provides Chrome Preconditions shared among media tests.
package pre
import (
"chromiumos/tast/local/chrome"
"chromiumos/tast/testing"
)
// ChromeVideo returns a precondition with Chrome started and logging enabled.
func ChromeVideo() testing.Precondition { return chromeVideoPre }
var chromeVideoPre = chrome.NewPrecondition("video",
chrome.ExtraArgs(chromeVideoArgs...),
chrome.ExtraArgs(chromeBypassPermissionsArgs...))
// ChromeVideoWithFakeWebcam returns precondition equal to ChromeVideo above,
// supplementing it with the use of a fake video/audio capture device (a.k.a.
// "fake webcam"), see https://webrtc.org/testing/.
func ChromeVideoWithFakeWebcam() testing.Precondition { return chromeVideoWithFakeWebcamPre }
var chromeVideoWithFakeWebcamPre = chrome.NewPrecondition("videoWithFakeWebcam",
chrome.ExtraArgs(chromeVideoArgs...),
chrome.ExtraArgs(chromeFakeWebcamArgs...))
// ChromeCameraPerf returns a precondition that Chrome is started with camera
// tests-specific setting and without verbose logging that can affect the
// performance. This precondition should be used only for performance tests.
func ChromeCameraPerf() testing.Precondition { return chromeCameraPerfPre }
var chromeCameraPerfPre = chrome.NewPrecondition("cameraPerf",
chrome.ExtraArgs(chromeBypassPermissionsArgs...),
chrome.ExtraArgs(chromeSuppressNotificationsArgs...))