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 (*Runner) Report ¶
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.