@@ -21,7 +21,9 @@ XPCOMUtils.defineLazyServiceGetter(
21
21
function restore_prefs ( ) {
22
22
Services . prefs . clearUserPref ( "network.cookie.cookieBehavior" ) ;
23
23
Services . prefs . clearUserPref ( "network.cookie.lifetimePolicy" ) ;
24
- Services . prefs . clearUserPref ( "network.cookieSettings.unblocked_for_testing" ) ;
24
+ Services . prefs . clearUserPref (
25
+ "network.cookieJarSettings.unblocked_for_testing"
26
+ ) ;
25
27
}
26
28
27
29
registerCleanupFunction ( restore_prefs ) ;
@@ -52,7 +54,7 @@ async function test_cookie_settings({
52
54
thirdPartyCookiesEnabled,
53
55
cookiesExpireAfterSession,
54
56
rejectTrackers,
55
- cookieSettingsLocked ,
57
+ cookieJarSettingsLocked ,
56
58
} ) {
57
59
let firstPartyURI = NetUtil . newURI ( "http://example.com/" ) ;
58
60
let thirdPartyURI = NetUtil . newURI ( "http://example.org/" ) ;
@@ -111,12 +113,12 @@ async function test_cookie_settings({
111
113
112
114
is (
113
115
Services . prefs . prefIsLocked ( "network.cookie.cookieBehavior" ) ,
114
- cookieSettingsLocked ,
116
+ cookieJarSettingsLocked ,
115
117
"Cookie behavior pref lock status should be what is expected"
116
118
) ;
117
119
is (
118
120
Services . prefs . prefIsLocked ( "network.cookie.lifetimePolicy" ) ,
119
- cookieSettingsLocked ,
121
+ cookieJarSettingsLocked ,
120
122
"Cookie lifetime pref lock status should be what is expected"
121
123
) ;
122
124
@@ -127,9 +129,9 @@ async function test_cookie_settings({
127
129
await tab . linkedBrowser . contentWindow . gotoPref ( "panePrivacy" ) ;
128
130
await SpecialPowers . spawn (
129
131
tab . linkedBrowser ,
130
- [ { cookiesEnabled, cookieSettingsLocked } ] ,
132
+ [ { cookiesEnabled, cookieJarSettingsLocked } ] ,
131
133
// eslint-disable-next-line no-shadow
132
- async function ( { cookiesEnabled, cookieSettingsLocked } ) {
134
+ async function ( { cookiesEnabled, cookieJarSettingsLocked } ) {
133
135
let deleteOnCloseCheckbox = content . document . getElementById (
134
136
"deleteOnClose"
135
137
) ;
@@ -139,7 +141,7 @@ async function test_cookie_settings({
139
141
"deleteOnCloseCheckbox should not be null."
140
142
) ;
141
143
142
- let expectControlsDisabled = ! cookiesEnabled || cookieSettingsLocked ;
144
+ let expectControlsDisabled = ! cookiesEnabled || cookieJarSettingsLocked ;
143
145
is (
144
146
deleteOnCloseCheckbox . disabled ,
145
147
expectControlsDisabled ,
@@ -197,14 +199,14 @@ add_task(async function prepare_tracker_tables() {
197
199
198
200
add_task ( async function test_initial_state ( ) {
199
201
Services . prefs . setBoolPref (
200
- "network.cookieSettings .unblocked_for_testing" ,
202
+ "network.cookieJarSettings .unblocked_for_testing" ,
201
203
true
202
204
) ;
203
205
await test_cookie_settings ( {
204
206
cookiesEnabled : true ,
205
207
thirdPartyCookiesEnabled : true ,
206
208
cookiesExpireAfterSession : false ,
207
- cookieSettingsLocked : false ,
209
+ cookieJarSettingsLocked : false ,
208
210
} ) ;
209
211
restore_prefs ( ) ;
210
212
} ) ;
@@ -213,7 +215,7 @@ add_task(async function test_undefined_unlocked() {
213
215
Services . prefs . setIntPref ( "network.cookie.cookieBehavior" , 3 ) ;
214
216
Services . prefs . setIntPref ( "network.cookie.lifetimePolicy" , 2 ) ;
215
217
Services . prefs . setBoolPref (
216
- "network.cookieSettings .unblocked_for_testing" ,
218
+ "network.cookieJarSettings .unblocked_for_testing" ,
217
219
true
218
220
) ;
219
221
await setupPolicyEngineWithJson ( {
@@ -236,7 +238,7 @@ add_task(async function test_undefined_unlocked() {
236
238
237
239
add_task ( async function test_disabled ( ) {
238
240
Services . prefs . setBoolPref (
239
- "network.cookieSettings .unblocked_for_testing" ,
241
+ "network.cookieJarSettings .unblocked_for_testing" ,
240
242
true
241
243
) ;
242
244
await setupPolicyEngineWithJson ( {
@@ -251,14 +253,14 @@ add_task(async function test_disabled() {
251
253
cookiesEnabled : false ,
252
254
thirdPartyCookiesEnabled : true ,
253
255
cookiesExpireAfterSession : false ,
254
- cookieSettingsLocked : false ,
256
+ cookieJarSettingsLocked : false ,
255
257
} ) ;
256
258
restore_prefs ( ) ;
257
259
} ) ;
258
260
259
261
add_task ( async function test_third_party_disabled ( ) {
260
262
Services . prefs . setBoolPref (
261
- "network.cookieSettings .unblocked_for_testing" ,
263
+ "network.cookieJarSettings .unblocked_for_testing" ,
262
264
true
263
265
) ;
264
266
await setupPolicyEngineWithJson ( {
@@ -273,14 +275,14 @@ add_task(async function test_third_party_disabled() {
273
275
cookiesEnabled : true ,
274
276
thirdPartyCookiesEnabled : false ,
275
277
cookiesExpireAfterSession : false ,
276
- cookieSettingsLocked : false ,
278
+ cookieJarSettingsLocked : false ,
277
279
} ) ;
278
280
restore_prefs ( ) ;
279
281
} ) ;
280
282
281
283
add_task ( async function test_disabled_and_third_party_disabled ( ) {
282
284
Services . prefs . setBoolPref (
283
- "network.cookieSettings .unblocked_for_testing" ,
285
+ "network.cookieJarSettings .unblocked_for_testing" ,
284
286
true
285
287
) ;
286
288
await setupPolicyEngineWithJson ( {
@@ -296,14 +298,14 @@ add_task(async function test_disabled_and_third_party_disabled() {
296
298
cookiesEnabled : false ,
297
299
thirdPartyCookiesEnabled : false ,
298
300
cookiesExpireAfterSession : false ,
299
- cookieSettingsLocked : false ,
301
+ cookieJarSettingsLocked : false ,
300
302
} ) ;
301
303
restore_prefs ( ) ;
302
304
} ) ;
303
305
304
306
add_task ( async function test_disabled_and_third_party_disabled_locked ( ) {
305
307
Services . prefs . setBoolPref (
306
- "network.cookieSettings .unblocked_for_testing" ,
308
+ "network.cookieJarSettings .unblocked_for_testing" ,
307
309
true
308
310
) ;
309
311
await setupPolicyEngineWithJson ( {
@@ -320,14 +322,14 @@ add_task(async function test_disabled_and_third_party_disabled_locked() {
320
322
cookiesEnabled : false ,
321
323
thirdPartyCookiesEnabled : false ,
322
324
cookiesExpireAfterSession : false ,
323
- cookieSettingsLocked : true ,
325
+ cookieJarSettingsLocked : true ,
324
326
} ) ;
325
327
restore_prefs ( ) ;
326
328
} ) ;
327
329
328
330
add_task ( async function test_undefined_locked ( ) {
329
331
Services . prefs . setBoolPref (
330
- "network.cookieSettings .unblocked_for_testing" ,
332
+ "network.cookieJarSettings .unblocked_for_testing" ,
331
333
true
332
334
) ;
333
335
await setupPolicyEngineWithJson ( {
@@ -342,14 +344,14 @@ add_task(async function test_undefined_locked() {
342
344
cookiesEnabled : true ,
343
345
thirdPartyCookiesEnabled : true ,
344
346
cookiesExpireAfterSession : false ,
345
- cookieSettingsLocked : true ,
347
+ cookieJarSettingsLocked : true ,
346
348
} ) ;
347
349
restore_prefs ( ) ;
348
350
} ) ;
349
351
350
352
add_task ( async function test_cookie_expire ( ) {
351
353
Services . prefs . setBoolPref (
352
- "network.cookieSettings .unblocked_for_testing" ,
354
+ "network.cookieJarSettings .unblocked_for_testing" ,
353
355
true
354
356
) ;
355
357
await setupPolicyEngineWithJson ( {
@@ -364,14 +366,14 @@ add_task(async function test_cookie_expire() {
364
366
cookiesEnabled : true ,
365
367
thirdPartyCookiesEnabled : true ,
366
368
cookiesExpireAfterSession : true ,
367
- cookieSettingsLocked : false ,
369
+ cookieJarSettingsLocked : false ,
368
370
} ) ;
369
371
restore_prefs ( ) ;
370
372
} ) ;
371
373
372
374
add_task ( async function test_cookie_reject_trackers ( ) {
373
375
Services . prefs . setBoolPref (
374
- "network.cookieSettings .unblocked_for_testing" ,
376
+ "network.cookieJarSettings .unblocked_for_testing" ,
375
377
true
376
378
) ;
377
379
await setupPolicyEngineWithJson ( {
@@ -387,14 +389,14 @@ add_task(async function test_cookie_reject_trackers() {
387
389
thirdPartyCookiesEnabled : true ,
388
390
cookiesExpireAfterSession : false ,
389
391
rejectTrackers : true ,
390
- cookieSettingsLocked : false ,
392
+ cookieJarSettingsLocked : false ,
391
393
} ) ;
392
394
restore_prefs ( ) ;
393
395
} ) ;
394
396
395
397
add_task ( async function test_cookie_expire_locked ( ) {
396
398
Services . prefs . setBoolPref (
397
- "network.cookieSettings .unblocked_for_testing" ,
399
+ "network.cookieJarSettings .unblocked_for_testing" ,
398
400
true
399
401
) ;
400
402
await setupPolicyEngineWithJson ( {
@@ -410,14 +412,14 @@ add_task(async function test_cookie_expire_locked() {
410
412
cookiesEnabled : true ,
411
413
thirdPartyCookiesEnabled : true ,
412
414
cookiesExpireAfterSession : true ,
413
- cookieSettingsLocked : true ,
415
+ cookieJarSettingsLocked : true ,
414
416
} ) ;
415
417
restore_prefs ( ) ;
416
418
} ) ;
417
419
418
420
add_task ( async function test_disabled_cookie_expire_locked ( ) {
419
421
Services . prefs . setBoolPref (
420
- "network.cookieSettings .unblocked_for_testing" ,
422
+ "network.cookieJarSettings .unblocked_for_testing" ,
421
423
true
422
424
) ;
423
425
await setupPolicyEngineWithJson ( {
@@ -435,7 +437,7 @@ add_task(async function test_disabled_cookie_expire_locked() {
435
437
cookiesEnabled : false ,
436
438
thirdPartyCookiesEnabled : false ,
437
439
cookiesExpireAfterSession : true ,
438
- cookieSettingsLocked : true ,
440
+ cookieJarSettingsLocked : true ,
439
441
} ) ;
440
442
restore_prefs ( ) ;
441
443
} ) ;
0 commit comments