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| skip-if(xulRuntime.OS=="WINNT"&&isDebugBuild) slow
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/. */
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 127243;
9 var summary = 'Do not crash on watch';
10 var actual = 'No Crash';
11 var expect = 'No Crash';
13 printBugNumber(BUGNUMBER);
14 printStatus (summary);
16 if (typeof window != 'undefined' && typeof document != 'undefined')
17 {
18 // delay test driver end
19 gDelayTestDriverEnd = true;
20 window.addEventListener('load', handleLoad, false);
21 }
22 else
23 {
24 printStatus('This test must be run in the browser');
25 reportCompare(expect, actual, summary);
27 }
29 var div;
31 function handleLoad()
32 {
33 div = document.createElement('div');
34 document.body.appendChild(div);
35 div.setAttribute('id', 'id1');
36 div.style.width = '50px';
37 div.style.height = '100px';
38 div.style.overflow = 'auto';
40 for (var i = 0; i < 5; i++)
41 {
42 var p = document.createElement('p');
43 var t = document.createTextNode('blah');
44 p.appendChild(t);
45 div.appendChild(p);
46 }
48 div.watch('scrollTop', wee);
50 setTimeout('setScrollTop()', 1000);
51 }
53 function wee(id, oldval, newval)
54 {
55 var t = document.createTextNode('setting ' + id +
56 ' value ' + div.scrollTop +
57 ' oldval ' + oldval +
58 ' newval ' + newval);
59 var p = document.createElement('p');
60 p.appendChild(t);
61 document.body.appendChild(p);
63 return newval;
64 }
66 function setScrollTop()
67 {
68 div.scrollTop = 42;
70 reportCompare(expect, actual, summary);
72 gDelayTestDriverEnd = false;
73 jsTestDriverEnd();
75 }