js/src/tests/js1_5/Regress/regress-261887.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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 -- we violate the spec here with our new iterators
     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 // testcase from Oscar Fogelberg <osfo@home.se>
     9 var BUGNUMBER = 261887;
    10 var summary = 'deleted properties should not be visited by for in';
    11 var actual = '';
    12 var expect = '';
    14 printBugNumber(BUGNUMBER);
    15 printStatus (summary);
    17 var count = 0;
    18 var result = "";
    19 var value = "";
    21 var t = new Object();
    22 t.one = "one";
    23 t.two = "two";
    24 t.three = "three";
    25 t.four = "four";
    27 for (var prop in t) {
    28   if (count==1) delete(t.three);
    29   count++;
    30   value = value + t[prop];
    31   result = result + prop;
    32 }
    34 expect = 'onetwofour:onetwofour';
    35 actual = value + ':' + result;
    37 reportCompare(expect, actual, summary);

mercurial