KhronosGroup/WebGL — pull request #400 by toji (2013-10-11 23:19:29+00:00)
Title: Started version 2.0.0 of the WebGL conformance tests

This is a first-stab at updating the conformance test harness to support WebGL 2 contexts and tests. This pull-request is being put up to facilitate discussion about how to best approach this next generation of conformance test. If you have questions, comments, or concerns please add them here or on the mailing list.

The primary changes are:

* If the "version" query arg is >= 2.0.0 all tests will attempt to create WebGL 2 contexts unless explicitly specified otherwise. (Attempts to create a "webgl2" or "experimental-webgl2" contextId)
* If the "version" is less than 2.0.0 a WebGL 1 context will be created, so this harness is still usable for WebGL 1 tests.
* wtu.create3DContext now accepts a third parameter, which is an explicit context version. Pass 2 to indicate that a WebGL 2 context is required. If not specified, this will look at the query arg "webglVersion", which is now passed down by the test harness, and defaults to 1 if not present.
* The test lists can now accept a --max-version in addition to the --min-version. Most WebGL 1.0 tests should still function correctly with WebGL 2.0 with no changes, so this shouldn't except for tests which are explicitly WebGL 1.0 only. (Such as context-type-test.html) In those cases an equivalent WebGL 2 test should be added. I am currently using --max-version 1.9.9 to indicate WebGL 1-only tests.
* WebGL 2-specific tests are currently being placed in the "conformance2" folder, which sits alongside "conformance".
* I have added WebGL 2 versions of "constants-and-properties.html", "context-type-test.html", and "methods.html". I've also ported some of the extension tests over to use the newly built-in functions. These have been placed in the "core" folder, which I think is a terrible name but have yet to come up with something better.
* Many more tests will be needed to cover the full WebGL 2 functionality, this just provides a framework to build them in.

In addition to the above I've also done some minor beautification on the test harness (down with thick blocky borders!) I actually have a version that is more aggressively restyled with the intention of making it work well for mobile devices, but I'll wait until the basics here are in place before I try introducing those changes.

This pull request does not handle archiving the 1.0.3 tests. We should either move the current test set into "conformance-suites" or decide that the 2.x tests will exist alongside the 1.x tests and place it in a different folder (tests2?) before accepting this code.