| This test ensures WebGL implementations interact correctly with the canvas tag's probablySupportsContext function, that getContext and probablySupportsContext are implemented consistently with one another, and that malformed parameters to probablySupportsContext are handled correctly. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| Canvas.probablySupportsContext('2d') |
| |
| PASS probablySupportsContext('2d') is consistent with getContext('2d') |
| PASS probablySupportsContext('2d') returns true |
| PASS getContext('2d') returns true (context exists) |
| Testing getContext and probablySupportsContext('2d') after a context is created |
| PASS probablySupportsContext('2d') returns true |
| PASS probablySupportsContext('webkit-3d') returns false |
| PASS webkit-3d context does not exist |
| |
| WebGL disabled |
| |
| Canvas.probablySupportsContext('webkit-3d') |
| |
| PASS probablySupportsContext('webkit-3d') is consistent with getContext('webkit-3d') |
| FAIL probablySupportsContext('webkit-3d') returns false |
| FAIL getContext('webkit-3d') returns false (context does not exist) |
| |
| Canvas.probablySupportsContext('experimental-webgl') |
| |
| PASS probablySupportsContext('experimental-webgl') is consistent with getContext('experimental-webgl') |
| FAIL probablySupportsContext('experimental-webgl') returns false |
| FAIL getContext('experimental-webgl') returns false (context does not exist) |
| |
| Canvas.probablySupportsContext('moz-webgl') |
| |
| PASS probablySupportsContext('moz-webgl') is consistent with getContext('moz-webgl') |
| FAIL probablySupportsContext('moz-webgl') returns false |
| FAIL getContext('moz-webgl') returns false (context does not exist) |
| |
| WebGL enabled |
| |
| Canvas.probablySupportsContext('webkit-3d') |
| |
| PASS probablySupportsContext('webkit-3d') is consistent with getContext('webkit-3d') |
| PASS probablySupportsContext('webkit-3d') returns true |
| PASS getContext('webkit-3d') returns true (context exists) |
| Testing getContext and probablySupportsContext('webkit-3d') after a context is created |
| PASS probablySupportsContext('webkit-3d') returns true |
| PASS probablySupportsContext('2d') returns false |
| PASS 2d context does not exist |
| |
| Canvas.probablySupportsContext('experimental-webgl') |
| |
| PASS probablySupportsContext('experimental-webgl') is consistent with getContext('experimental-webgl') |
| PASS probablySupportsContext('experimental-webgl') returns true |
| PASS getContext('experimental-webgl') returns true (context exists) |
| Testing getContext and probablySupportsContext('experimental-webgl') after a context is created |
| PASS probablySupportsContext('experimental-webgl') returns true |
| PASS probablySupportsContext('2d') returns false |
| PASS 2d context does not exist |
| |
| Canvas.probablySupportsContext('moz-webgl') |
| |
| PASS probablySupportsContext('moz-webgl') is consistent with getContext('moz-webgl') |
| FAIL probablySupportsContext('moz-webgl') returns false |
| FAIL getContext('moz-webgl') returns false (context does not exist) |
| |
| Testing malformed attributes that cause probablySupportsContext and getContext to be undefined |
| |
| canvas.probablySupportsContext('webkit-3d' ,{ get alpha() { throw 'Test alpha Error'; } }) |
| |
| PASS supports is undefined |
| PASS context is undefined |
| PASS probablySupportsContext('webkit-3d' ,{ get alpha() { throw 'Test alpha Error'; } }) is consistent with getContext('webkit-3d' ,{ get alpha() { throw 'Test alpha Error'; } }) |
| FAIL probablySupportsContext('webkit-3d' ,{ get alpha() { throw 'Test alpha Error'; } }) returns false |
| FAIL getContext('webkit-3d' ,{ get alpha() { throw 'Test alpha Error'; } }) returns false (context does not exist) |
| |
| canvas.probablySupportsContext('webkit-3d' ,{ get depth() { throw 'Test depth Error'; } }) |
| |
| PASS supports is undefined |
| PASS context is undefined |
| PASS probablySupportsContext('webkit-3d' ,{ get depth() { throw 'Test depth Error'; } }) is consistent with getContext('webkit-3d' ,{ get depth() { throw 'Test depth Error'; } }) |
| FAIL probablySupportsContext('webkit-3d' ,{ get depth() { throw 'Test depth Error'; } }) returns false |
| FAIL getContext('webkit-3d' ,{ get depth() { throw 'Test depth Error'; } }) returns false (context does not exist) |
| |
| canvas.probablySupportsContext('webkit-3d' ,{ get stencil() { throw 'Test stencil Error'; } }) |
| |
| PASS supports is undefined |
| PASS context is undefined |
| PASS probablySupportsContext('webkit-3d' ,{ get stencil() { throw 'Test stencil Error'; } }) is consistent with getContext('webkit-3d' ,{ get stencil() { throw 'Test stencil Error'; } }) |
| FAIL probablySupportsContext('webkit-3d' ,{ get stencil() { throw 'Test stencil Error'; } }) returns false |
| FAIL getContext('webkit-3d' ,{ get stencil() { throw 'Test stencil Error'; } }) returns false (context does not exist) |
| |
| canvas.probablySupportsContext('webkit-3d' ,{ get antialias() { throw 'Test antialias Error'; } }) |
| |
| PASS supports is undefined |
| PASS context is undefined |
| PASS probablySupportsContext('webkit-3d' ,{ get antialias() { throw 'Test antialias Error'; } }) is consistent with getContext('webkit-3d' ,{ get antialias() { throw 'Test antialias Error'; } }) |
| FAIL probablySupportsContext('webkit-3d' ,{ get antialias() { throw 'Test antialias Error'; } }) returns false |
| FAIL getContext('webkit-3d' ,{ get antialias() { throw 'Test antialias Error'; } }) returns false (context does not exist) |
| |
| canvas.probablySupportsContext('webkit-3d' ,{ get premultipliedAlpha() { throw 'Test premultipliedAlpha Error'; } }) |
| |
| PASS supports is undefined |
| PASS context is undefined |
| PASS probablySupportsContext('webkit-3d' ,{ get premultipliedAlpha() { throw 'Test premultipliedAlpha Error'; } }) is consistent with getContext('webkit-3d' ,{ get premultipliedAlpha() { throw 'Test premultipliedAlpha Error'; } }) |
| FAIL probablySupportsContext('webkit-3d' ,{ get premultipliedAlpha() { throw 'Test premultipliedAlpha Error'; } }) returns false |
| FAIL getContext('webkit-3d' ,{ get premultipliedAlpha() { throw 'Test premultipliedAlpha Error'; } }) returns false (context does not exist) |
| |
| canvas.probablySupportsContext('webkit-3d' ,{ get preserveDrawingBUffer() { throw 'Test preserveDrawingBuffer Error'; } }) |
| |
| PASS supports is undefined |
| PASS context is undefined |
| PASS probablySupportsContext('webkit-3d' ,{ get preserveDrawingBUffer() { throw 'Test preserveDrawingBuffer Error'; } }) is consistent with getContext('webkit-3d' ,{ get preserveDrawingBUffer() { throw 'Test preserveDrawingBuffer Error'; } }) |
| FAIL probablySupportsContext('webkit-3d' ,{ get preserveDrawingBUffer() { throw 'Test preserveDrawingBuffer Error'; } }) returns false |
| FAIL getContext('webkit-3d' ,{ get preserveDrawingBUffer() { throw 'Test preserveDrawingBuffer Error'; } }) returns false (context does not exist) |
| |
| Testing how probablySupportsContext handles no parameters |
| PASS document.createElement('canvas').probablySupportsContext() is false |
| |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |