toolkit/devtools/sourcemap/tests/unit/test_base64_vlq.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 /*
     2  * WARNING!
     3  *
     4  * Do not edit this file directly, it is built from the sources at
     5  * https://github.com/mozilla/source-map/
     6  */
     8 Components.utils.import('resource://test/Utils.jsm');
     9 /* -*- Mode: js; js-indent-level: 2; -*- */
    10 /*
    11  * Copyright 2011 Mozilla Foundation and contributors
    12  * Licensed under the New BSD license. See LICENSE or:
    13  * http://opensource.org/licenses/BSD-3-Clause
    14  */
    15 define("test/source-map/test-base64-vlq", ["require", "exports", "module"], function (require, exports, module) {
    17   var base64VLQ = require('source-map/base64-vlq');
    19   exports['test normal encoding and decoding'] = function (assert, util) {
    20     var result;
    21     for (var i = -255; i < 256; i++) {
    22       result = base64VLQ.decode(base64VLQ.encode(i));
    23       assert.ok(result);
    24       assert.equal(result.value, i);
    25       assert.equal(result.rest, "");
    26     }
    27   };
    29 });
    30 function run_test() {
    31   runSourceMapTests('test/source-map/test-base64-vlq', do_throw);
    32 }

mercurial