Daniel Martí 4641607cd6 cmd/gogio: log chrome's console messages in TestJSOnChrome
For example, if the browser doesn't have webgl at all, the gio app will
fail to load. This will result in the screenshot being incorrect,
without an apparent reason:

	--- FAIL: TestJSOnChrome (0.89s)
	    js_test.go:122: got 0xffffffffffffffff at (5,5), want 0xffff00000000ffff
	    js_test.go:122: got 0xffffffffffffffff at (595,595), want 0xffff00000000ffff

The underlying webgl error was accessible if one added a sleep and ran
'go test -headless=false', allowing to open the console and see the
error messages.

Instead, capture them via chromedp and print them to the test's logger:

	--- FAIL: TestJSOnChrome (0.89s)
	    js_test.go:79: console log: "2019/10/29 12:41:07 app: webgl is not supported"
	    js_test.go:79: console warning: "exit code:", 1
	    js_test.go:122: got 0xffffffffffffffff at (5,5), want 0xffff00000000ffff
	    js_test.go:122: got 0xffffffffffffffff at (595,595), want 0xffff00000000ffff

JS Exceptions are a completely different mechanism, so they're not
covered by this patch. We can add them at a later time if needed.

While at it, update to the latest tagged version of chromedp.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
2019-10-29 14:06:30 +01:00
2019-10-29 01:38:16 +01:00
2019-10-23 10:18:11 +02:00
2019-10-14 23:10:35 +02:00
2019-10-23 10:53:59 +02:00
2019-10-14 23:18:49 +02:00
2019-10-12 14:04:34 +02:00
2019-03-31 10:47:22 +02:00
2019-10-12 14:36:25 +02:00
2019-10-12 14:36:25 +02:00

Gio

Immediate mode GUI programs in Go. See gioui.org for details and documentation.

builds.sr.ht status

Issues

File bugs and TODOs through the issue tracker or send an email to ~eliasnaur/gio@todo.sr.ht. For general discussion, use the mailing list: ~eliasnaur/gio@lists.sr.ht.

Contributing

Post discussion and patches to the mailing list. No Sourcehut account is required and you can post without being subscribed.

See the contribution guide for more details.

License

Dual-licensed under UNLICENSE or the MIT.

S
Description
No description provided
Readme Multiple Licenses 6.2 MiB
Languages
Go 89.6%
C 7%
Java 1.7%
Objective-C 1.6%