Backed out changeset 07e5bf2cb7c8 (bug 913597) for desktop B2G failures.

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2014-01-22 12:48:44 -05:00
parent 22b25af0fd
commit d1deda9bb5
4 changed files with 3 additions and 30 deletions

View File

@ -7,5 +7,4 @@ 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]

View File

@ -1,28 +0,0 @@
<!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">
<body>
<canvas id="c1"></canvas>
<canvas id="c2"></canvas>
<script>
function testContextRetrieval(canvasId, creationId, shouldSucceed) {
var canvas = document.getElementById(canvasId);
ok(canvas, 'Invalid `canvasId`: ' + canvasId);
var createdGL = canvas.getContext(creationId);
if (shouldSucceed) {
ok(createdGL, 'Request for \'' + creationId + '\' should succeed.');
} else {
ok(!createdGL, 'Request for \'' + creationId + '\' should fail.');
}
}
testContextRetrieval('c1', 'experimental-webgl', true);
testContextRetrieval('c2', 'moz-webgl', false);
</script>

View File

@ -685,7 +685,8 @@ static bool
IsContextIdWebGL(const nsAString& str)
{
return str.EqualsLiteral("webgl") ||
str.EqualsLiteral("experimental-webgl");
str.EqualsLiteral("experimental-webgl") ||
str.EqualsLiteral("moz-webgl");
}
already_AddRefed<nsISupports>

View File

@ -1142,6 +1142,7 @@ 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 },