browser/components/preferences/tests/browser_privacypane_8.js

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 function test() {
     6   let loader = Cc["@mozilla.org/moz/jssubscript-loader;1"].
     7                getService(Ci.mozIJSSubScriptLoader);
     8   let rootDir = getRootDirectory(gTestPath);
     9   let jar = getJar(rootDir);
    10   if (jar) {
    11     let tmpdir = extractJarToTmp(jar);
    12     rootDir = "file://" + tmpdir.path + '/';
    13   }
    14   loader.loadSubScript(rootDir + "privacypane_tests_perwindow.js", this);
    16   run_test_subset([
    17     // history mode should be initialized to remember
    18     test_historymode_retention("remember", undefined),
    20     // history mode should remain remember; toggle acceptCookies checkbox
    21     test_custom_retention("acceptCookies", "remember"),
    23     // history mode should now be custom; set history mode to dontremember
    24     test_historymode_retention("dontremember", "custom"),
    26     // history mode should remain custom; set history mode to remember
    27     test_historymode_retention("remember", "custom"),
    29     // history mode should now be remember
    30     test_historymode_retention("remember", "remember"),
    32     // reset all preferences to their default values once we're done
    33     reset_preferences
    34   ]);
    35 }

mercurial