Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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/.
4 */
6 const MANIFESTS = [
7 do_get_file("data/test_bug292789.manifest")
8 ];
10 registerManifests(MANIFESTS);
12 var gIOS;
13 var gCR;
15 function check_accessibility(spec, desired)
16 {
17 var uri = gIOS.newURI(spec, null, null);
18 var actual = gCR.allowContentToAccess(uri);
19 do_check_eq(desired, actual);
20 }
22 function run_test()
23 {
24 gIOS = Cc["@mozilla.org/network/io-service;1"].
25 getService(Ci.nsIIOService);
26 gCR = Cc["@mozilla.org/chrome/chrome-registry;1"].
27 getService(Ci.nsIXULChromeRegistry);
28 gCR.checkForNewChrome();
30 check_accessibility("chrome://test1/content/", false);
31 check_accessibility("chrome://test1/content/foo.js", false);
32 check_accessibility("chrome://test2/content/", true);
33 check_accessibility("chrome://test2/content/foo.js", true);
34 check_accessibility("chrome://test3/content/", false);
35 check_accessibility("chrome://test3/content/foo.js", false);
36 check_accessibility("chrome://test4/content/", true);
37 }