For a while, I've been using the demos both to show off, but also as integration tests. In some ways these are contradictory goals. For example, issue #244 is tricky because the scope of the demo is relatively high, and makes for a bad integration test for just, say, multi target rendering.
For this ticket, I'd like to expand the existing test framework (or entirely rewriting it if needed) so as to provide tools to make it easy to do assertions on webgl output itself. The main thing that would have to be different, is that the test should not run all in the same webgl context. One possibility is to run them in iframes instead. This kind of isolation would be good to have in general.
Some basic goals for this test:
Rework test framework to run tests in iframe context. This might mean reading tests as javascript files, and generate the iframe sources live so as to inject other test harness stuff.
Generate a small canvas (say, 8x8 or so) for the rendering context.
Some mechanism for reading pixel data from the context and asserting something about it. I think screenshot comparison isn't desired, but picking a few pixels to assert about is useful.
For a while, I've been using the demos both to show off, but also as integration tests. In some ways these are contradictory goals. For example, issue #244 is tricky because the scope of the demo is relatively high, and makes for a bad integration test for just, say, multi target rendering.
For this ticket, I'd like to expand the existing test framework (or entirely rewriting it if needed) so as to provide tools to make it easy to do assertions on webgl output itself. The main thing that would have to be different, is that the test should not run all in the same webgl context. One possibility is to run them in iframes instead. This kind of isolation would be good to have in general.
Some basic goals for this test: