browser/base/content/test/social/browser_defaults.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1
michael@0 2 let SocialService = Cu.import("resource://gre/modules/SocialService.jsm", {}).SocialService;
michael@0 3
michael@0 4 // this test ensures that any builtin providers have the builtin flag that we
michael@0 5 // need to help with "install" of a builtin.
michael@0 6 function test() {
michael@0 7 let manifestPrefs = Services.prefs.getDefaultBranch("social.manifest.");
michael@0 8 let prefs = manifestPrefs.getChildList("", []);
michael@0 9 ok(prefs.length > 0, "we have builtin providers");
michael@0 10 for (let pref of prefs) {
michael@0 11 let manifest = JSON.parse(manifestPrefs.getComplexValue(pref, Ci.nsISupportsString).data);
michael@0 12 ok(manifest.builtin, "manifest is builtin " + manifest.origin);
michael@0 13 }
michael@0 14 }

mercurial