js/src/tests/js1_4/Regress/regress-7224.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 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 /**
     8  *  File Name:          regress-7224.js
     9  *  Reference:          js1_2
    10  *  Description:        Remove support for the arg
    11  *  Author:             ** replace with your e-mail address **
    12  */
    14 var SECTION = "regress";       // provide a document reference (ie, ECMA section)
    15 var VERSION = "JS1_4"; // Version of JavaScript or ECMA
    16 var TITLE   = "Regression test for bugzilla #7224";       // Provide ECMA section title or a description
    17 var BUGNUMBER = "http://bugzilla.mozilla.org/show_bug.cgi?id=7224";     // Provide URL to bugsplat or bugzilla report
    19 startTest();               // leave this alone
    21 /*
    22  * Calls to AddTestCase here. AddTestCase is a function that is defined
    23  * in shell.js and takes three arguments:
    24  * - a string representation of what is being tested
    25  * - the expected result
    26  * - the actual result
    27  *
    28  * For example, a test might look like this:
    29  *
    30  * var zip = /[\d]{5}$/;
    31  *
    32  * AddTestCase(
    33  * "zip = /[\d]{5}$/; \"PO Box 12345 Boston, MA 02134\".match(zip)",   // description of the test
    34  *  "02134",                                                           // expected result
    35  *  "PO Box 12345 Boston, MA 02134".match(zip) );                      // actual result
    36  *
    37  */
    39 var f = new Function( "return arguments.caller" );
    40 var o = {};
    42 o.foo = f;
    43 o.foo("a", "b", "c");
    46 AddTestCase(
    47   "var f = new Function( 'return arguments.caller' ); f()",
    48   undefined,
    49   f() );
    51 AddTestCase(
    52   "var o = {}; o.foo = f; o.foo('a')",
    53   undefined,
    54   o.foo('a') );
    56 test();       // leave this alone.  this executes the test cases and
    57 // displays results.

mercurial