mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Add pref to force WebGL context creation failure
The pref `webgl.testing.context_creation_error` will cause creation of a new WebGLRenderingContext to fail, iff set to true. Also update test expectation of `context_creation_error.html` to pass.
This commit is contained in:
parent
2da8eb0342
commit
c034d99880
5 changed files with 10 additions and 8 deletions
|
@ -31668,7 +31668,7 @@
|
|||
"support"
|
||||
],
|
||||
"mozilla/webgl/context_creation_error.html": [
|
||||
"d6ffc0c4ea5671399d3c9b6440608b47c80699cf",
|
||||
"583df4d3fb090862383338a50548b4afb333dd52",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/webgl/draw_arrays_simple.html": [
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
[context_creation_error.html]
|
||||
type: reftest
|
||||
[WebGLContextEvent "webglcontextcreationerror" event]
|
||||
expected: FAIL
|
||||
|
||||
prefs: ["webgl.testing.context_creation_error:true"]
|
||||
|
|
|
@ -14,9 +14,7 @@ async_test(function() {
|
|||
"'statusMessage' should be a string, " + typeof(e.statusMessage) + " found");
|
||||
}), false);
|
||||
|
||||
// TODO: Create a dummy function to fail the webgl context forcefully from js tests.
|
||||
// Now that antialias doesn't throw an error, there isn't a way to force context creation errors.
|
||||
var gl = canvas.getContext('webgl', { antialiasing: true });
|
||||
var gl = canvas.getContext('webgl');
|
||||
|
||||
assert_false(!!gl, "WebGLContext creation succeeded, please update this test!");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue