зеркало из https://github.com/mozilla/gecko-dev.git
Bug 913597 - Remove support for obsolete 'moz-webgl' name for creation of WebGL contexts. r=jgilbert
This commit is contained in:
Родитель
4f06d50f9b
Коммит
49ea89d9a9
|
@ -7,4 +7,5 @@ support-files =
|
|||
[test_no_arr_points.html]
|
||||
[test_webgl_available.html]
|
||||
[test_webgl_conformance.html]
|
||||
[test_webgl_request_context.html]
|
||||
[test_webgl_request_mismatch.html]
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE HTML>
|
||||
<title>WebGL test: 'webgl' and 'experimental-webgl' context requests succeed,
|
||||
'moz-webgl' context requests fail.</title>
|
||||
<script src="/MochiKit/MochiKit.js"></script>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
|
||||
<script src="driver-info.js"></script>
|
||||
<body>
|
||||
<canvas id="c1"></canvas>
|
||||
<canvas id="c2"></canvas>
|
||||
<script>
|
||||
|
||||
var testFunc = ok;
|
||||
if (DriverInfo.getOS() == DriverInfo.OS.B2G) {
|
||||
testFunc = todo;
|
||||
}
|
||||
|
||||
function testContextRetrieval(canvasId, creationId, shouldSucceed) {
|
||||
var canvas = document.getElementById(canvasId);
|
||||
ok(canvas, 'Invalid `canvasId`: ' + canvasId);
|
||||
|
||||
var createdGL = canvas.getContext(creationId);
|
||||
if (shouldSucceed) {
|
||||
testFunc(createdGL, 'Request for \'' + creationId + '\' should succeed.');
|
||||
} else {
|
||||
ok(!createdGL, 'Request for \'' + creationId + '\' should fail.');
|
||||
}
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({'set': [
|
||||
['webgl.force-enabled', true]
|
||||
]}, function() {
|
||||
testContextRetrieval('c1', 'experimental-webgl', true);
|
||||
testContextRetrieval('c2', 'moz-webgl', false);
|
||||
SimpleTest.finish();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
@ -685,8 +685,7 @@ static bool
|
|||
IsContextIdWebGL(const nsAString& str)
|
||||
{
|
||||
return str.EqualsLiteral("webgl") ||
|
||||
str.EqualsLiteral("experimental-webgl") ||
|
||||
str.EqualsLiteral("moz-webgl");
|
||||
str.EqualsLiteral("experimental-webgl");
|
||||
}
|
||||
|
||||
already_AddRefed<nsISupports>
|
||||
|
|
|
@ -1142,7 +1142,6 @@ static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
|
|||
{ "@mozilla.org/content/post-content-iterator;1", &kNS_CONTENTITERATOR_CID },
|
||||
{ "@mozilla.org/content/pre-content-iterator;1", &kNS_PRECONTENTITERATOR_CID },
|
||||
{ "@mozilla.org/content/subtree-content-iterator;1", &kNS_SUBTREEITERATOR_CID },
|
||||
{ "@mozilla.org/content/canvas-rendering-context;1?id=moz-webgl", &kNS_CANVASRENDERINGCONTEXTWEBGL_CID },
|
||||
{ "@mozilla.org/content/canvas-rendering-context;1?id=experimental-webgl", &kNS_CANVASRENDERINGCONTEXTWEBGL_CID },
|
||||
#ifdef MOZ_WEBGL_CONFORMANT
|
||||
{ "@mozilla.org/content/canvas-rendering-context;1?id=webgl", &kNS_CANVASRENDERINGCONTEXTWEBGL_CID },
|
||||
|
|
Загрузка…
Ссылка в новой задаче