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.
1 // |reftest| random -- bug 524788
2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 //-----------------------------------------------------------------------------
9 var BUGNUMBER = 363258;
10 var summary = 'Timer resolution';
11 var actual = '';
12 var expect = '';
15 //-----------------------------------------------------------------------------
16 test();
17 //-----------------------------------------------------------------------------
19 function test()
20 {
21 enterFunc ('test');
22 printBugNumber(BUGNUMBER);
23 printStatus (summary);
25 var start = 0;
26 var stop = 0;
27 var i;
28 var limit = 0;
29 var incr = 10;
30 var resolution = 5;
32 while (stop - start == 0)
33 {
34 limit += incr;
35 start = Date.now();
36 for (i = 0; i < limit; i++) {}
37 stop = Date.now();
38 }
40 print('limit=' + limit + ', resolution=' + resolution + ', time=' + (stop - start));
42 expect = true;
43 actual = (stop - start <= resolution);
45 reportCompare(expect, actual, summary);
47 exitFunc ('test');
48 }