Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <meta charset="utf-8"> |
michael@0 | 5 | <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 6 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
michael@0 | 7 | </head> |
michael@0 | 8 | <body> |
michael@0 | 9 | <p id="display"></p> |
michael@0 | 10 | <div id="content" style="display: none"> |
michael@0 | 11 | <canvas id="c" width="1" height="1"></canvas> |
michael@0 | 12 | </div> |
michael@0 | 13 | <pre id="test"> |
michael@0 | 14 | <script type="application/javascript"> |
michael@0 | 15 | |
michael@0 | 16 | function testInt64NonFinite(arg) { |
michael@0 | 17 | // We can use a WebGLRenderingContext to test conversion to 64-bit signed |
michael@0 | 18 | // ints edge cases. |
michael@0 | 19 | var gl = $("c").getContext("experimental-webgl"); |
michael@0 | 20 | if (!gl) { |
michael@0 | 21 | // No WebGL support on MacOS 10.5. Just skip this test |
michael@0 | 22 | todo(false, "WebGL not supported"); |
michael@0 | 23 | return; |
michael@0 | 24 | } |
michael@0 | 25 | var error = gl.getError() |
michael@0 | 26 | |
michael@0 | 27 | // on the b2g emulator we get GL_INVALID_FRAMEBUFFER_OPERATION |
michael@0 | 28 | if (error == 0x0506) // GL_INVALID_FRAMEBUFFER_OPERATION |
michael@0 | 29 | return; |
michael@0 | 30 | |
michael@0 | 31 | is(error, 0, "Should not start in an error state"); |
michael@0 | 32 | |
michael@0 | 33 | var b = gl.createBuffer(); |
michael@0 | 34 | gl.bindBuffer(gl.ARRAY_BUFFER, b); |
michael@0 | 35 | |
michael@0 | 36 | var a = new Float32Array(1); |
michael@0 | 37 | gl.bufferData(gl.ARRAY_BUFFER, a, gl.STATIC_DRAW); |
michael@0 | 38 | |
michael@0 | 39 | gl.bufferSubData(gl.ARRAY_BUFFER, arg, a); |
michael@0 | 40 | |
michael@0 | 41 | is(gl.getError(), 0, "Should have treated non-finite double as 0"); |
michael@0 | 42 | } |
michael@0 | 43 | |
michael@0 | 44 | testInt64NonFinite(NaN); |
michael@0 | 45 | testInt64NonFinite(Infinity); |
michael@0 | 46 | testInt64NonFinite(-Infinity); |
michael@0 | 47 | </script> |
michael@0 | 48 | </pre> |
michael@0 | 49 | </body> |
michael@0 | 50 | </html> |