browser/components/preferences/in-content/tests/browser_privacypane_8.js

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

michael@0 1 /* Any copyright is dedicated to the Public Domain.
michael@0 2 * http://creativecommons.org/publicdomain/zero/1.0/ */
michael@0 3
michael@0 4 function test() {
michael@0 5 let loader = Cc["@mozilla.org/moz/jssubscript-loader;1"].
michael@0 6 getService(Ci.mozIJSSubScriptLoader);
michael@0 7 let rootDir = getRootDirectory(gTestPath);
michael@0 8 let jar = getJar(rootDir);
michael@0 9 if (jar) {
michael@0 10 let tmpdir = extractJarToTmp(jar);
michael@0 11 rootDir = "file://" + tmpdir.path + '/';
michael@0 12 }
michael@0 13 loader.loadSubScript(rootDir + "privacypane_tests_perwindow.js", this);
michael@0 14
michael@0 15 run_test_subset([
michael@0 16 // history mode should be initialized to remember
michael@0 17 test_historymode_retention("remember", undefined),
michael@0 18
michael@0 19 // history mode should remain remember; toggle acceptCookies checkbox
michael@0 20 test_custom_retention("acceptCookies", "remember"),
michael@0 21
michael@0 22 // history mode should now be custom; set history mode to dontremember
michael@0 23 test_historymode_retention("dontremember", "custom"),
michael@0 24
michael@0 25 // history mode should remain custom; set history mode to remember
michael@0 26 test_historymode_retention("remember", "custom"),
michael@0 27
michael@0 28 // history mode should now be remember
michael@0 29 test_historymode_retention("remember", "remember"),
michael@0 30
michael@0 31 // reset all preferences to their default values once we're done
michael@0 32 reset_preferences
michael@0 33 ]);
michael@0 34 }

mercurial