mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
4641607cd6
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>