Documentation ¶
Overview ¶
Package nearbyshare contains local Tast tests that exercise ChromeOS Nearby Share.
Index ¶
- func CrosToPhoneHighVis(ctx context.Context, s *testing.State)
- func CrosToPhoneInContacts(ctx context.Context, s *testing.State)
- func OnboardingInitialPageUI(ctx context.Context, s *testing.State)
- func OnboardingVisibilityPageUI(ctx context.Context, s *testing.State)
- func PhoneToCrosBackgroundScanning(ctx context.Context, s *testing.State)
- func PhoneToCrosBackgroundScanningDisabled(ctx context.Context, s *testing.State)
- func PhoneToCrosHighVis(ctx context.Context, s *testing.State)
- func PhoneToCrosInContacts(ctx context.Context, s *testing.State)
- func PhoneToCrosNotVisible(ctx context.Context, s *testing.State)
- func RebootPhone(ctx context.Context, s *testing.State)
- func SmokeHighVisibilityUI(ctx context.Context, s *testing.State)
- func SmokeSnippetLibrary(ctx context.Context, s *testing.State)
- type NearbyService
- func (n *NearbyService) AcceptFastInitiationNotification(ctx context.Context, ...) (*empty.Empty, error)
- func (n *NearbyService) AcceptIncomingShareNotificationAndWaitForCompletion(ctx context.Context, req *nearbyservice.CrOSReceiveFilesRequest) (*empty.Empty, error)
- func (n *NearbyService) ClearTransferredFiles(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (n *NearbyService) CloseChrome(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (n *NearbyService) CrOSAttributes(ctx context.Context, req *empty.Empty) (*nearbyservice.CrOSAttributesResponse, error)
- func (n *NearbyService) CrOSSetup(ctx context.Context, req *nearbyservice.CrOSSetupRequest) (*empty.Empty, error)
- func (n *NearbyService) FilesHashes(ctx context.Context, req *nearbyservice.CrOSFileHashRequest) (*nearbyservice.CrOSFileHashResponse, error)
- func (n *NearbyService) NewChromeLogin(ctx context.Context, req *nearbyservice.CrOSLoginRequest) (*empty.Empty, error)
- func (n *NearbyService) PrepareFiles(ctx context.Context, req *nearbyservice.CrOSPrepareFileRequest) (*nearbyservice.CrOSPrepareFileResponse, error)
- func (n *NearbyService) SaveLogs(ctx context.Context, req *nearbyservice.SaveLogsRequest) (*empty.Empty, error)
- func (n *NearbyService) SelectShareTarget(ctx context.Context, req *nearbyservice.CrOSSelectShareTargetRequest) (*nearbyservice.CrOSShareTokenResponse, error)
- func (n *NearbyService) StartHighVisibilityMode(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (n *NearbyService) StartLogging(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (n *NearbyService) StartReceiving(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (n *NearbyService) StartSend(ctx context.Context, req *nearbyservice.CrOSSendFilesRequest) (*empty.Empty, error)
- func (n *NearbyService) WaitForOnboardingFlow(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (n *NearbyService) WaitForSenderAndAcceptShare(ctx context.Context, req *nearbyservice.CrOSReceiveFilesRequest) (*nearbyservice.CrOSShareTokenResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CrosToPhoneHighVis ¶
CrosToPhoneHighVis tests file sharing with a CrOS device as sender and Android device as receiver.
func CrosToPhoneInContacts ¶
CrosToPhoneInContacts tests in-contact file sharing with a CrOS device as sender and Android device as receiver.
func OnboardingInitialPageUI ¶
OnboardingInitialPageUI tests that we can enable Nearby Share in the initial onboarding page.
func OnboardingVisibilityPageUI ¶
OnboardingVisibilityPageUI tests that we can enable Nearby Share in the visibility selection page of onboarding workflow.
func PhoneToCrosBackgroundScanning ¶
PhoneToCrosBackgroundScanning tests background scanning and file sharing with an Android device as sender and CrOS device as receiver.
func PhoneToCrosBackgroundScanningDisabled ¶
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 ¶
PhoneToCrosHighVis tests file sharing with an Android device as sender and CrOS device as receiver.
func PhoneToCrosInContacts ¶
PhoneToCrosInContacts tests in-contact file sharing with an Android device as sender and CrOS device as receiver.
func PhoneToCrosNotVisible ¶
PhoneToCrosNotVisible tests in-contact file sharing with an Android device as sender and CrOS device as receiver.
func RebootPhone ¶
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 ¶
SmokeHighVisibilityUI tests that we can open the receiving UI surface from Quick Settings.
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 ¶
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 ¶
func (n *NearbyService) CrOSAttributes(ctx context.Context, req *empty.Empty) (*nearbyservice.CrOSAttributesResponse, error)
CrOSAttributes retrieves useful information about the DUT to aid debugging.
func (*NearbyService) CrOSSetup ¶
func (n *NearbyService) CrOSSetup(ctx context.Context, req *nearbyservice.CrOSSetupRequest) (*empty.Empty, error)
CrOSSetup performs Nearby Share setup on a ChromeOS device.
func (*NearbyService) FilesHashes ¶
func (n *NearbyService) FilesHashes(ctx context.Context, req *nearbyservice.CrOSFileHashRequest) (*nearbyservice.CrOSFileHashResponse, error)
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 ¶
func (n *NearbyService) PrepareFiles(ctx context.Context, req *nearbyservice.CrOSPrepareFileRequest) (*nearbyservice.CrOSPrepareFileResponse, error)
PrepareFiles extracts test files.
func (*NearbyService) SaveLogs ¶
func (n *NearbyService) SaveLogs(ctx context.Context, req *nearbyservice.SaveLogsRequest) (*empty.Empty, error)
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 ¶
func (n *NearbyService) SelectShareTarget(ctx context.Context, req *nearbyservice.CrOSSelectShareTargetRequest) (*nearbyservice.CrOSShareTokenResponse, error)
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 ¶
StartLogging starts logging at the start of a test.
func (*NearbyService) StartReceiving ¶
StartReceiving enables high vis mode receiving via Javascript.
func (*NearbyService) StartSend ¶
func (n *NearbyService) StartSend(ctx context.Context, req *nearbyservice.CrOSSendFilesRequest) (*empty.Empty, error)
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 ¶
func (n *NearbyService) WaitForSenderAndAcceptShare(ctx context.Context, req *nearbyservice.CrOSReceiveFilesRequest) (*nearbyservice.CrOSShareTokenResponse, error)
WaitForSenderAndAcceptShare is called by a receiver to wait for a sender to appear in their list and accepts the share from them.
Source Files ¶
- cros_to_phone_high_vis.go
- cros_to_phone_in_contacts.go
- doc.go
- nearby_share_service.go
- onboarding_initial_page_ui.go
- onboarding_visibility_page_ui.go
- phone_to_cros_background_scanning.go
- phone_to_cros_background_scanning_disabled.go
- phone_to_cros_high_vis.go
- phone_to_cros_in_contacts.go
- phone_to_cros_not_visible.go
- reboot_phone.go
- smoke_high_visibility_ui.go
- smoke_snippet_library.go