trayrun

package
v1.17.16 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package trayrun runs the reproduction of the issue "The tray's availability" (internal/issues, TrayAvailableName; step 60.1) in an app: it asks desktop.TrayAvailable from a goroutine, as an app does, then places a SystemTray and waits for what the tray reports through the error reporter of the binding. The Linux test (package desktop, a real dbus-daemon), the app of the Wine and emulator tests (examples/dev/trayavailable) and the browser test's app (internal/platform/web/desktoptest) share it, so that each platform runs the same steps.

It is plain Go with no OS tags and does not import testing: apps link it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

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

Runner is the reproduction in one app. Wrap goes around the app's content, and Report gets the errors of the binding's error reporter.

func New

func New() *Runner

New makes a runner.

func (*Runner) Report

func (r *Runner) Report(err error)

Report takes an error of the binding's error reporter; the app's ErrorReporter calls it. It does not block: an error over the buffer is dropped.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, platform, want string, wait time.Duration) issues.TrayAvailableReport

Run runs the reproduction and returns its report: platform and want are the report's (what the runner calls the platform, and what its desktop is expected to answer). It waits for the app to be built, asks desktop.TrayAvailable, places the tray on the UI thread, and takes the first error reported in the wait after it (none: the tray was shown). It must not be called on the UI thread.

func (*Runner) Wrap

func (r *Runner) Wrap(child widgets.Widget) widgets.Widget

Wrap returns a widget that builds child and, once Run asks for it, a SystemTray beside it (in a Stack, so that the tray's coming does not make the elements of child again).

Jump to

Keyboard shortcuts

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