Bug 1472212 - Expose the pref variable for browser.tabs.remote.separatePrivilegedContentProcess in AboutNewTabService over XPCOM for tests.
MozReview-Commit-ID: JkyDcX2axga
--- a/browser/components/newtab/aboutNewTabService.js
+++ b/browser/components/newtab/aboutNewTabService.js
@@ -107,16 +107,17 @@ AboutNewTabService.prototype = {
service: true
}],
observe(subject, topic, data) {
switch (topic) {
case "nsPref:changed":
if (data === PREF_SEPARATE_PRIVILEGED_CONTENT_PROCESS) {
this._privilegedContentProcess = Services.prefs.getBoolPref(PREF_SEPARATE_PRIVILEGED_CONTENT_PROCESS);
+ this.notifyChange();
} else if (data === PREF_ACTIVITY_STREAM_PRERENDER_ENABLED) {
this._activityStreamPrerender = Services.prefs.getBoolPref(PREF_ACTIVITY_STREAM_PRERENDER_ENABLED);
this.notifyChange();
} else if (!IS_RELEASE_OR_BETA && data === PREF_ACTIVITY_STREAM_DEBUG) {
this._activityStreamDebug = Services.prefs.getBoolPref(PREF_ACTIVITY_STREAM_DEBUG, false);
this.updatePrerenderedPath();
this.notifyChange();
}
@@ -295,16 +296,20 @@ AboutNewTabService.prototype = {
get overridden() {
return this._overridden;
},
get activityStreamEnabled() {
return this._activityStreamEnabled;
},
+ get privilegedContentProcess() {
+ return this._privilegedContentProcess;
+ },
+
get activityStreamPrerender() {
return this._activityStreamPrerender;
},
get activityStreamDebug() {
return this._activityStreamDebug;
},
--- a/browser/components/newtab/nsIAboutNewTabService.idl
+++ b/browser/components/newtab/nsIAboutNewTabService.idl
@@ -40,22 +40,28 @@ interface nsIAboutNewTabService : nsISup
/**
* Returns true if the default resource is activity stream and isn't
* overridden
*/
readonly attribute bool activityStreamEnabled;
/**
- * Returns true if the the prerendering pref for activity stream is true
+ * Returns true if the pref to use a separate privileged content process
+ * is true
+ */
+ readonly attribute bool privilegedContentProcess;
+
+ /**
+ * Returns true if the prerendering pref for activity stream is true
*/
readonly attribute bool activityStreamPrerender;
/**
- * Returns true if the the debug pref for activity stream is true
+ * Returns true if the debug pref for activity stream is true
*/
readonly attribute bool activityStreamDebug;
/**
* Returns the locale of the activity stream interface
*/
readonly attribute ACString activityStreamLocale;