js/src/tests/js1_2/version120/boolean-001.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 -- obsolete test
     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  *  File Name:          boolean-001.js
    10  *  Description:
    11  *
    12  *  In JavaScript 1.2, new Boolean(false) evaluates to false.
    13  *
    14  *  Author:             christine@netscape.com
    15  *  Date:               11 August 1998
    16  */
    17 var SECTION = "boolean-001.js";
    18 var VERSION = "JS1_2";
    19 startTest();
    20 var TITLE   = "new Boolean(false) should evaluate to false";
    22 writeHeaderToLog( SECTION + " "+ TITLE);
    24 BooleanTest( "new Boolean(true)",  new Boolean(true),  true );
    25 BooleanTest( "new Boolean(false)", new Boolean(false), false );
    26 BooleanTest( "true",               true,               true );
    27 BooleanTest( "false",              false,              false );
    29 test();
    31 function BooleanTest( string, object, expect ) {
    32   if ( object ) {
    33     result = true;
    34   } else {
    35     result = false;
    36   }
    38   new TestCase(
    39     SECTION,
    40     string,
    41     expect,
    42     result );
    43 }

mercurial