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 | <head> |
michael@0 | 2 | <title>Floating-point exception handler test</title> |
michael@0 | 3 | <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 4 | |
michael@0 | 5 | <body onload="runTest()"> |
michael@0 | 6 | <embed id="plugin1" type="application/x-test" width="400" height="400"></embed> |
michael@0 | 7 | |
michael@0 | 8 | <script class="testbody" type="application/javascript"> |
michael@0 | 9 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 10 | |
michael@0 | 11 | function doDiv(x, y) { |
michael@0 | 12 | var z; |
michael@0 | 13 | z = x / y; |
michael@0 | 14 | |
michael@0 | 15 | for (i = 0 + x; i < 1000; ++i) |
michael@0 | 16 | z = y / x; |
michael@0 | 17 | |
michael@0 | 18 | z = x / y; |
michael@0 | 19 | return z; |
michael@0 | 20 | } |
michael@0 | 21 | |
michael@0 | 22 | function runTest() |
michael@0 | 23 | { |
michael@0 | 24 | ok(isNaN(doDiv(0.0, 0.0)), "Undefined division-by-zero doesn't crash"); |
michael@0 | 25 | |
michael@0 | 26 | try { |
michael@0 | 27 | document.getElementById('plugin1').enableFPExceptions(); |
michael@0 | 28 | } |
michael@0 | 29 | catch (e) { |
michael@0 | 30 | ok(true, "No special code to set the FPU bit in the testplugin."); |
michael@0 | 31 | SimpleTest.finish(); |
michael@0 | 32 | return; |
michael@0 | 33 | } |
michael@0 | 34 | |
michael@0 | 35 | ok(isNaN(doDiv(0.0, 0.0)), "Undefined division-by-zero doesn't crash again."); |
michael@0 | 36 | SimpleTest.finish(); |
michael@0 | 37 | } |
michael@0 | 38 | </script> |