pre

package
v0.0.0-...-9474aff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2022 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package pre contains preconditions for inputs tests.

Index

Constants

This section is empty.

Variables

View Source
var GrammarEnabledModels = []string{
	"betty",
	"octopus",
	"nocturne",
	"hatch",
}

GrammarEnabledModels is a list boards where Grammar Check is enabled.

View Source
var InputsStableModels = hwdep.Model(StableModels...)

InputsStableModels is a shortlist of models aiming to run critical inputs tests. More information refers to http://b/161415599.

View Source
var InputsUnstableModels = hwdep.SkipOnModel(append(StableModels, "kevin")...)

InputsUnstableModels is a list of models to run inputs tests at 'informational' so that we know once they are stable enough to be promoted to CQ. kevin64 is an experimental board does not support nacl, which fails Canvas installation. To stabilize the tests, have to exclude entire kevin model as no distinguish between kevin and kevin64.

View Source
var MultiwordEnabledModels = []string{
	"betty",
	"octopus",
	"nocturne",
	"hatch",
}

MultiwordEnabledModels is a subset of boards where multiword suggestions are enabled. The multiword feature is enabled on all 4gb boards, with a list of 2gb boards having the feature explicitly disabled. See the following link for a list of all boards where the feature is disabled. https://source.chromium.org/search?q=f:make.defaults%20%22-ondevice_text_suggestions%22&ss=chromiumos&start=31

View Source
var NonVKClamshell = inputsPreCondition("non_vk_clamshell_pre", clamshellMode, false, false)

NonVKClamshell creates a precondition for testing physical keyboard. It forces device to be clamshell mode and vk disabled.

View Source
var NonVKClamshellInGuest = inputsPreCondition("non_vk_clamshell_guest_pre", clamshellMode, false, false, chrome.GuestLogin())

NonVKClamshellInGuest creates a precondition for testing physical keyboard in guest mode. It forces device to be clamshell mode and vk disabled.

View Source
var NonVKClamshellReset = inputsPreCondition("non_vk_clamshell_reset_pre", clamshellMode, false, true)

NonVKClamshellReset creates a precondition for testing physical keyboard. It forces device to be clamshell mode and vk disabled. It restarts Chrome session and logs in as new user for each test.

View Source
var NonVKClamshellWithGrammarCheck = inputsPreCondition("non_vk_clamshell_with_grammar_check_pre", clamshellMode, false, false, chrome.ExtraArgs("--enable-features=OnDeviceGrammarCheck"))

NonVKClamshellWithGrammarCheck creates a precondition for testing physical keyboard, and with OnDeviceGrammarCheck flag enabled. It forces device to be clamshell mode and vk disabled.

View Source
var NonVKClamshellWithMultiwordSuggest = inputsPreCondition("non_vk_clamshell_with_multiword_suggest_pre", clamshellMode, false, false, chrome.ExtraArgs("--enable-features=AssistMultiWord"))

NonVKClamshellWithMultiwordSuggest creates a precondition for testing physical keyboard, and with AssistMultiWord flag enabled. It forces device to be clamshell mode and vk disabled.

View Source
var StableModels = []string{
	"betty",

	"bobba",
	"bobba360",
	"casta",
	"coral",
	"kefka",

	"cyan",

	"hana",

	"kodama",
	"krane",
	"kukui",

	"snappy",
}

StableModels is a list of boards that stable enough and aim to run inputs tests in CQ.

View Source
var VKEnabled = inputsPreCondition("virtual_keyboard_enabled_pre", notForced, true, false)

VKEnabled creates a new precondition can be shared by tests that require an already-started Chromeobject that enables virtual keyboard. It uses --enable-virtual-keyboard to force enable virtual keyboard regardless of device ui mode.

View Source
var VKEnabledClamshell = inputsPreCondition("virtual_keyboard_enabled_clamshell_pre", clamshellMode, true, false)

VKEnabledClamshell creates a new precondition for testing virtual keyboard in clamshell mode. It uses Chrome API settings.a11y.virtual_keyboard to enable a11y vk instead of --enable-virtual-keyboard.

View Source
var VKEnabledClamshellInGuest = inputsPreCondition("virtual_keyboard_enabled_clamshell_guest_pre", clamshellMode, true, false, chrome.GuestLogin())

VKEnabledClamshellInGuest creates a new precondition the same as VKEnabledClamshell in Guest mode.

View Source
var VKEnabledClamshellReset = inputsPreCondition("virtual_keyboard_enabled_clamshell_reset_pre", clamshellMode, true, true)

VKEnabledClamshellReset is the same setup as VKEnabledClamshell. It restarts Chrome session and logs in as new user for each test.

View Source
var VKEnabledClamshellWithAssistAutocorrectReset = inputsPreCondition("virtual_keyboard_enabled_clamshell_assist_autocorrect_pre", clamshellMode, true, true, chrome.ExtraArgs("--enable-features=AssistAutoCorrect"))

VKEnabledClamshellWithAssistAutocorrectReset is similar to VKEnabledClamshell, but also with AssistAutoCorrect flag enabled. It restarts Chrome session and logs in as new user for each test.

View Source
var VKEnabledInGuest = inputsPreCondition("virtual_keyboard_enabled_guest_pre", notForced, true, false, chrome.GuestLogin())

VKEnabledInGuest creates a new precondition the same as VKEnabled in Guest mode.

View Source
var VKEnabledReset = inputsPreCondition("virtual_keyboard_enabled_reset_pre", notForced, true, true)

VKEnabledReset is the same setup as VKEnabled. It restarts Chrome session and logs in as new user for each test.

View Source
var VKEnabledTablet = inputsPreCondition("virtual_keyboard_enabled_tablet_pre", tabletMode, true, false)

VKEnabledTablet creates a new precondition for testing virtual keyboard in tablet mode. It boots device in tablet mode and force enabled virtual keyboard via chrome flag --enable-virtual-keyboard.

View Source
var VKEnabledTabletInGuest = inputsPreCondition("virtual_keyboard_enabled_tablet_guest_pre", tabletMode, true, false, chrome.GuestLogin())

VKEnabledTabletInGuest creates a new precondition the same as VKEnabledTablet in Guest mode.

View Source
var VKEnabledTabletReset = inputsPreCondition("virtual_keyboard_enabled_tablet_reset_pre", tabletMode, true, true)

VKEnabledTabletReset is the same setup as VKEnabledTablet. It restarts Chrome session and logs in as new user for each test.

View Source
var VKEnabledTabletWithAssistAutocorrectReset = inputsPreCondition("virtual_keyboard_enabled_tablet_assist_autocorrect_pre", tabletMode, true, true, chrome.ExtraArgs("--enable-features=AssistAutoCorrect"))

VKEnabledTabletWithAssistAutocorrectReset is similar to VKEnabledTablet, but also with AssistAutoCorrect flag enabled. It restarts Chrome session and logs in as new user for each test.

View Source
var VKEnabledTabletWithMultipasteSuggestion = inputsPreCondition("virtual_keyboard_enabled_tablet_multipaste_suggestion_pre", tabletMode, true, true, chrome.ExtraArgs("--enable-features=VirtualKeyboardMultipasteSuggestion"))

VKEnabledTabletWithMultipasteSuggestion is similar to VKEnabledTablet, but also with multipaste-suggestion flag enabled. It restarts Chrome session and logs in as new user for each test.

Functions

func ResetIMEStatus

func ResetIMEStatus(ctx context.Context, tconn *chrome.TestConn) error

ResetIMEStatus resets IME input method and settings.

Types

type PreData

type PreData struct {
	Chrome      *chrome.Chrome
	TestAPIConn *chrome.TestConn
	UserContext *useractions.UserContext
}

The PreData object is made available to users of this precondition via:

func DoSomething(ctx context.Context, s *testing.State) {
	d := s.PreValue().(pre.PreData)
	...
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL