Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | # HG changeset patch |
michael@0 | 2 | # Parent fae4a63127468bd6447453495c82b9f6713888fb |
michael@0 | 3 | |
michael@0 | 4 | diff --git a/content/canvas/test/webgl/conformance/extensions/oes-standard-derivatives.html b/content/canvas/test/webgl/conformance/extensions/oes-standard-derivatives.html |
michael@0 | 5 | --- a/content/canvas/test/webgl/conformance/extensions/oes-standard-derivatives.html |
michael@0 | 6 | +++ b/content/canvas/test/webgl/conformance/extensions/oes-standard-derivatives.html |
michael@0 | 7 | @@ -116,16 +116,17 @@ if (!gl) { |
michael@0 | 8 | testPassed("Successfully enabled OES_standard_derivatives extension"); |
michael@0 | 9 | |
michael@0 | 10 | runSupportedTest(true); |
michael@0 | 11 | |
michael@0 | 12 | runHintTestEnabled(); |
michael@0 | 13 | runShaderTests(true); |
michael@0 | 14 | runOutputTests(); |
michael@0 | 15 | runUniqueObjectTest(); |
michael@0 | 16 | + runReferenceCycleTest(); |
michael@0 | 17 | } |
michael@0 | 18 | } |
michael@0 | 19 | |
michael@0 | 20 | function runSupportedTest(extensionEnabled) { |
michael@0 | 21 | var supported = gl.getSupportedExtensions(); |
michael@0 | 22 | if (supported.indexOf("OES_standard_derivatives") >= 0) { |
michael@0 | 23 | if (extensionEnabled) { |
michael@0 | 24 | testPassed("OES_standard_derivatives listed as supported and getExtension succeeded"); |
michael@0 | 25 | @@ -365,16 +366,30 @@ function runUniqueObjectTest() |
michael@0 | 26 | } else if (window.opera && window.opera.collect) { |
michael@0 | 27 | window.opera.collect(); |
michael@0 | 28 | } else { |
michael@0 | 29 | attemptToForceGC(); |
michael@0 | 30 | } |
michael@0 | 31 | shouldBe('gl.getExtension("OES_standard_derivatives").myProperty', '2'); |
michael@0 | 32 | } |
michael@0 | 33 | |
michael@0 | 34 | +function runReferenceCycleTest() |
michael@0 | 35 | +{ |
michael@0 | 36 | + // create some reference cycles. The goal is to see if they cause leaks. The point is that |
michael@0 | 37 | + // some browser test runners have instrumentation to detect leaked refcounted objects. |
michael@0 | 38 | + |
michael@0 | 39 | + debug("Testing reference cycles between context and extension objects"); |
michael@0 | 40 | + var ext = gl.getExtension("OES_standard_derivatives"); |
michael@0 | 41 | + |
michael@0 | 42 | + // create cycle between extension and context, since the context has to hold a reference to the extension |
michael@0 | 43 | + ext.context = gl; |
michael@0 | 44 | + |
michael@0 | 45 | + // create a self-cycle on the extension object |
michael@0 | 46 | + ext.ext = ext; |
michael@0 | 47 | +} |
michael@0 | 48 | |
michael@0 | 49 | debug(""); |
michael@0 | 50 | successfullyParsed = true; |
michael@0 | 51 | </script> |
michael@0 | 52 | <script>finishTest();</script> |
michael@0 | 53 | |
michael@0 | 54 | </body> |
michael@0 | 55 | </html> |
michael@0 | 56 | diff --git a/content/canvas/test/webgl/conformance/extensions/oes-texture-float.html b/content/canvas/test/webgl/conformance/extensions/oes-texture-float.html |
michael@0 | 57 | --- a/content/canvas/test/webgl/conformance/extensions/oes-texture-float.html |
michael@0 | 58 | +++ b/content/canvas/test/webgl/conformance/extensions/oes-texture-float.html |
michael@0 | 59 | @@ -81,16 +81,17 @@ if (!gl) { |
michael@0 | 60 | |
michael@0 | 61 | if (!gl.getExtension("OES_texture_float")) { |
michael@0 | 62 | testPassed("No OES_texture_float support -- this is legal"); |
michael@0 | 63 | } else { |
michael@0 | 64 | testPassed("Successfully enabled OES_texture_float extension"); |
michael@0 | 65 | runTextureCreationTest(testProgram, true); |
michael@0 | 66 | runRenderTargetTest(testProgram); |
michael@0 | 67 | runUniqueObjectTest(); |
michael@0 | 68 | + runReferenceCycleTest(); |
michael@0 | 69 | } |
michael@0 | 70 | } |
michael@0 | 71 | |
michael@0 | 72 | // Needs to be global for shouldBe to see it. |
michael@0 | 73 | var pixels; |
michael@0 | 74 | |
michael@0 | 75 | function allocateTexture() |
michael@0 | 76 | { |
michael@0 | 77 | @@ -206,16 +207,30 @@ function runUniqueObjectTest() |
michael@0 | 78 | } else if (window.opera && window.opera.collect) { |
michael@0 | 79 | window.opera.collect(); |
michael@0 | 80 | } else { |
michael@0 | 81 | attemptToForceGC(); |
michael@0 | 82 | } |
michael@0 | 83 | shouldBe('gl.getExtension("OES_texture_float").myProperty', '2'); |
michael@0 | 84 | } |
michael@0 | 85 | |
michael@0 | 86 | +function runReferenceCycleTest() |
michael@0 | 87 | +{ |
michael@0 | 88 | + // create some reference cycles. The goal is to see if they cause leaks. The point is that |
michael@0 | 89 | + // some browser test runners have instrumentation to detect leaked refcounted objects. |
michael@0 | 90 | + |
michael@0 | 91 | + debug("Testing reference cycles between context and extension objects"); |
michael@0 | 92 | + var ext = gl.getExtension("OES_texture_float"); |
michael@0 | 93 | + |
michael@0 | 94 | + // create cycle between extension and context, since the context has to hold a reference to the extension |
michael@0 | 95 | + ext.context = gl; |
michael@0 | 96 | + |
michael@0 | 97 | + // create a self-cycle on the extension object |
michael@0 | 98 | + ext.ext = ext; |
michael@0 | 99 | +} |
michael@0 | 100 | |
michael@0 | 101 | debug(""); |
michael@0 | 102 | successfullyParsed = true; |
michael@0 | 103 | </script> |
michael@0 | 104 | <script>finishTest();</script> |
michael@0 | 105 | |
michael@0 | 106 | </body> |
michael@0 | 107 | </html> |