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
+3 -1
View File
@@ -44,7 +44,9 @@ func (d *X11TestDriver) Start(t_ *testing.T, path string, width, height int) (cl
display := fmt.Sprintf(":%d", rnd.Intn(100000)+1)
var xprog string
xflags := []string{"-wr"}
xflags := []string{
"-wr", // we want a white background; the default is black
}
if *headless {
xprog = "Xvfb" // virtual X server
xflags = append(xflags, "-screen", "0", fmt.Sprintf("%dx%dx24", width, height))