4 https://bugzilla.mozilla.org/show_bug.cgi?id=775852
8 <title>Test for Bug
775852</title>
9 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=775852">Mozilla Bug
775852</a>
15 <iframe id=
"content" style=
"display: none">
18 <script type=
"application/javascript">
20 /** Test for Bug
775852 **/
22 let win = document.getElementById(
"content").contentWindow;
23 let doc = win.document;
24 doc.body.innerHTML = `
<canvas width=
"1" height=
"1" id=
"c"></canvas>`;
26 let gl = doc.getElementById(
"c").getContext(
"experimental-webgl");
28 // No WebGL support on MacOS
10.5. Just skip this test
29 todo(false,
"WebGL not supported");
32 var setterCalled = false;
34 var extLength = gl.getSupportedExtensions().length;
36 "This test won't work right if we have no supported extensions");
38 win.Object.defineProperty(win.Array.prototype,
"0",
45 // Test that our property got defined correctly
46 let arr = new win.Array();
48 is(setterCalled, true,
"Setter should be called when setting prop on array");
52 is(gl.getSupportedExtensions().length, extLength,
53 "We should still have the same number of extensions");
55 is(setterCalled, false,
56 "Setter should not be called when getting supported extensions");