hiddenrun

package
v1.17.19 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: BSD-3-Clause Imports: 7 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 hiddenrun runs the reproduction of the issue "An app in the tray" (internal/issues, HiddenTrayName; step 65.1) in an app: it asks for the window to be minimized and reads IsMinimized at once, shows the window again, hides it (RegularWindowController.SetHidden), changes the state of a widget from a goroutine, as an event of an app does, and waits for the tree to be built with the new state, which the tooltip of its SystemTray shows. The app of the Linux display tests, of the Wine test and of the emulator test (examples/dev/hiddentray) 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

View Source
const (
	// Before is what the tray says until the state changes.
	Before = "connected"
	// After is what it says once the state changed, while the window is hidden.
	After = "connecting again"
)

The two things that the tray of the reproduction says.

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.

func New

func New() *Runner

New makes a runner.

func (*Runner) Run

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

Run runs the reproduction and returns its report: platform and hides are the report's (what the runner calls the platform, and whether it hides windows). It waits for the app to be built, then does the steps of the issue, waiting at most wait for the build of the changed state. A step that could not run leaves its word of the report empty, which the check reports. 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) whose tooltip is the state that the reproduction changes.

Jump to

Keyboard shortcuts

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