nearbyshare

package
v0.0.0-...-683b059 Latest Latest
Warning

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

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

Documentation

Overview

Package nearbyshare contains local Tast tests that exercise ChromeOS Nearby Share.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CrosToPhoneHighVis

func CrosToPhoneHighVis(ctx context.Context, s *testing.State)

CrosToPhoneHighVis tests file sharing with a CrOS device as sender and Android device as receiver.

func CrosToPhoneInContacts

func CrosToPhoneInContacts(ctx context.Context, s *testing.State)

CrosToPhoneInContacts tests in-contact file sharing with a CrOS device as sender and Android device as receiver.

func OnboardingInitialPageUI

func OnboardingInitialPageUI(ctx context.Context, s *testing.State)

OnboardingInitialPageUI tests that we can enable Nearby Share in the initial onboarding page.

func OnboardingVisibilityPageUI

func OnboardingVisibilityPageUI(ctx context.Context, s *testing.State)

OnboardingVisibilityPageUI tests that we can enable Nearby Share in the visibility selection page of onboarding workflow.

func PhoneToCrosBackgroundScanning

func PhoneToCrosBackgroundScanning(ctx context.Context, s *testing.State)

PhoneToCrosBackgroundScanning tests background scanning and file sharing with an Android device as sender and CrOS device as receiver.

func PhoneToCrosBackgroundScanningDisabled

func PhoneToCrosBackgroundScanningDisabled(ctx context.Context, s *testing.State)

PhoneToCrosBackgroundScanningDisabled tests that the background scanning notification does not appear if background scanning is toggled off with an Android device as sender and CrOS device as receiver.

func PhoneToCrosHighVis

func PhoneToCrosHighVis(ctx context.Context, s *testing.State)

PhoneToCrosHighVis tests file sharing with an Android device as sender and CrOS device as receiver.

func PhoneToCrosInContacts

func PhoneToCrosInContacts(ctx context.Context, s *testing.State)

PhoneToCrosInContacts tests in-contact file sharing with an Android device as sender and CrOS device as receiver.

func PhoneToCrosNotVisible

func PhoneToCrosNotVisible(ctx context.Context, s *testing.State)

PhoneToCrosNotVisible tests in-contact file sharing with an Android device as sender and CrOS device as receiver.

func RebootPhone

func RebootPhone(ctx context.Context, s *testing.State)

RebootPhone reboots the connected Android device. This is to help clear the phone state for other nearbyshare and crossdevice tests. TODO(b/207705988): Remove this test.

func SmokeHighVisibilityUI

func SmokeHighVisibilityUI(ctx context.Context, s *testing.State)

SmokeHighVisibilityUI tests that we can open the receiving UI surface from Quick Settings.

func SmokeSnippetLibrary

func SmokeSnippetLibrary(ctx context.Context, s *testing.State)

SmokeSnippetLibrary tests that we can successfully start and interact with the Nearby Snippet on the Android device.

Types

type NearbyService

type NearbyService struct {
	// contains filtered or unexported fields
}

NearbyService implements tast.cros.nearbyservice.NearbyShareService.

func (*NearbyService) AcceptFastInitiationNotification

func (n *NearbyService) AcceptFastInitiationNotification(ctx context.Context, req *nearbyservice.CrOSAcceptFastInitiationNotificationRequest) (*empty.Empty, error)

AcceptFastInitiationNotification accepts the incoming fast initiation notification. Fast initiation is shown when a nearby device is trying to find a share target. Used by background scanning tests.

func (*NearbyService) AcceptIncomingShareNotificationAndWaitForCompletion

func (n *NearbyService) AcceptIncomingShareNotificationAndWaitForCompletion(ctx context.Context, req *nearbyservice.CrOSReceiveFilesRequest) (*empty.Empty, error)

AcceptIncomingShareNotificationAndWaitForCompletion accepts the incoming transfer via notification. Used for in contact tests.

func (*NearbyService) ClearTransferredFiles

func (n *NearbyService) ClearTransferredFiles(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

ClearTransferredFiles clears the transferred files in the receivers Downloads folder.

func (*NearbyService) CloseChrome

func (n *NearbyService) CloseChrome(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

CloseChrome closes all surfaces and Chrome. This will likely be called in a defer in remote tests instead of called explicitly. So log everything that fails to aid debugging later.

func (*NearbyService) CrOSAttributes

CrOSAttributes retrieves useful information about the DUT to aid debugging.

func (*NearbyService) CrOSSetup

CrOSSetup performs Nearby Share setup on a ChromeOS device.

func (*NearbyService) FilesHashes

FilesHashes takes some filenames and returns a list of their hashes.

func (*NearbyService) NewChromeLogin

func (n *NearbyService) NewChromeLogin(ctx context.Context, req *nearbyservice.CrOSLoginRequest) (*empty.Empty, error)

NewChromeLogin logs into Chrome with Nearby Share flags enabled.

func (*NearbyService) PrepareFiles

PrepareFiles extracts test files.

func (*NearbyService) SaveLogs

SaveLogs saves the chrome and messages logs on the DUT. It will additionally save a screenshot and UI tree dump on error.

func (*NearbyService) SelectShareTarget

SelectShareTarget selects the expected receiver in the sending window.

func (*NearbyService) StartHighVisibilityMode

func (n *NearbyService) StartHighVisibilityMode(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

StartHighVisibilityMode starts high vis mode using the UI library.

func (*NearbyService) StartLogging

func (n *NearbyService) StartLogging(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

StartLogging starts logging at the start of a test.

func (*NearbyService) StartReceiving

func (n *NearbyService) StartReceiving(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

StartReceiving enables high vis mode receiving via Javascript.

func (*NearbyService) StartSend

StartSend starts to share files.

func (*NearbyService) WaitForOnboardingFlow

func (n *NearbyService) WaitForOnboardingFlow(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

WaitForOnboardingFlow waits for the Nearby Share setup page to open.

func (*NearbyService) WaitForSenderAndAcceptShare

WaitForSenderAndAcceptShare is called by a receiver to wait for a sender to appear in their list and accepts the share from them.

Jump to

Keyboard shortcuts

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