toolkit/components/sqlite/tests/xpcshell/data/worker_sqlite_shared.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 /* Any copyright is dedicated to the Public Domain.
     2  * http://creativecommons.org/publicdomain/zero/1.0/ */
     4 function send(message) {
     5   self.postMessage(message);
     6 }
     8 function do_test_complete() {
     9   send({kind: "do_test_complete", args: []});
    10 }
    12 function do_check_true(x) {
    13   send({kind: "do_check_true", args: [!!x]});
    14   if (x) {
    15     dump("TEST-PASS: " + x + "\n");
    16   } else {
    17     throw new Error("do_check_true failed");
    18   }
    19 }
    21 function do_check_eq(a, b) {
    22   let result = a == b;
    23   send({kind: "do_check_true", args: [result]});
    24   if (!result) {
    25     throw new Error("do_check_eq failed " + a + " != " + b);
    26   }
    27 }
    29 function do_check_neq(a, b) {
    30  let result = a != b;
    31  send({kind: "do_check_true", args: [result]});
    32  if (!result) {
    33    throw new Error("do_check_neq failed " + a + " == " + b);
    34  }
    35 }
    37 function do_print(x) {
    38   dump("TEST-INFO: " + x + "\n");
    39 }

mercurial