toolkit/devtools/sourcemap/tests/unit/test_api.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.

michael@0 1 /*
michael@0 2 * WARNING!
michael@0 3 *
michael@0 4 * Do not edit this file directly, it is built from the sources at
michael@0 5 * https://github.com/mozilla/source-map/
michael@0 6 */
michael@0 7
michael@0 8 Components.utils.import('resource://test/Utils.jsm');
michael@0 9 /* -*- Mode: js; js-indent-level: 2; -*- */
michael@0 10 /*
michael@0 11 * Copyright 2012 Mozilla Foundation and contributors
michael@0 12 * Licensed under the New BSD license. See LICENSE or:
michael@0 13 * http://opensource.org/licenses/BSD-3-Clause
michael@0 14 */
michael@0 15 define("test/source-map/test-api", ["require", "exports", "module"], function (require, exports, module) {
michael@0 16
michael@0 17 var sourceMap;
michael@0 18 try {
michael@0 19 sourceMap = require('source-map');
michael@0 20 } catch (e) {
michael@0 21 sourceMap = {};
michael@0 22 Components.utils.import('resource:///modules/devtools/SourceMap.jsm', sourceMap);
michael@0 23 }
michael@0 24
michael@0 25 exports['test that the api is properly exposed in the top level'] = function (assert, util) {
michael@0 26 assert.equal(typeof sourceMap.SourceMapGenerator, "function");
michael@0 27 assert.equal(typeof sourceMap.SourceMapConsumer, "function");
michael@0 28 assert.equal(typeof sourceMap.SourceNode, "function");
michael@0 29 };
michael@0 30
michael@0 31 });
michael@0 32 function run_test() {
michael@0 33 runSourceMapTests('test/source-map/test-api', do_throw);
michael@0 34 }

mercurial