cmd/gogio: start using layout.Flex in the e2e app

This vastly simplifies our code, and saves us the ugly math.

While at it, establish that a TestDriver must have a white background,
which is already satisfied by both existing implementations.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
This commit is contained in:
Daniel Martí
2019-10-31 15:25:29 +00:00
committed by Elias Naur
parent 3a341a3daf
commit 4e71f195ab
3 changed files with 38 additions and 56 deletions
+5 -2
View File
@@ -16,8 +16,11 @@ var headless = flag.Bool("headless", true, "run end-to-end tests in headless mod
type TestDriver interface {
// Start provides the test driver with a testing.T, as well as the path
// to the Gio app to use for the test. The app will be run with the
// given width and height. When the function returns, the gio app must
// be ready to use on the platform.
// given width and height, and the platform's background should be
// white.
//
// When the function returns, the gio app must be ready to use on the
// platform.
//
// The returned cleanup funcs must be run in reverse order, to mimic
// deferred funcs.