зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1399696 - aboutNewTabService should initialize with the correct _activityStreamPrerender value r=Mardak
MozReview-Commit-ID: BrLNwO74S5q --HG-- extra : rebase_source : 64838e834bf3e7b1d92d8994111882c490e8d342
This commit is contained in:
Родитель
a772602f0e
Коммит
897a0c2c24
|
@ -75,7 +75,7 @@ AboutNewTabService.prototype = {
|
|||
|
||||
_newTabURL: ABOUT_URL,
|
||||
_activityStreamEnabled: false,
|
||||
_activityStreamPrerender: true,
|
||||
_activityStreamPrerender: false,
|
||||
_overridden: false,
|
||||
|
||||
classID: Components.ID("{dfcd2adc-7867-4d3a-ba70-17501f208142}"),
|
||||
|
@ -136,6 +136,7 @@ AboutNewTabService.prototype = {
|
|||
} else {
|
||||
this._activityStreamEnabled = false;
|
||||
}
|
||||
this._activityStreamPrerender = Services.prefs.getBoolPref(PREF_ACTIVITY_STREAM_PRERENDER_ENABLED);
|
||||
this._newtabURL = ABOUT_URL;
|
||||
return true;
|
||||
},
|
||||
|
|
|
@ -27,6 +27,14 @@ function cleanup() {
|
|||
|
||||
do_register_cleanup(cleanup);
|
||||
|
||||
add_task(async function test_as_and_prerender_initialized() {
|
||||
Assert.equal(aboutNewTabService.activityStreamEnabled, Services.prefs.getBoolPref(ACTIVITY_STREAM_PREF),
|
||||
".activityStreamEnabled should be set to the correct initial value");
|
||||
Assert.equal(aboutNewTabService.activityStreamPrerender, Services.prefs.getBoolPref(ACTIVITY_STREAM_PRERENDER_PREF),
|
||||
".activityStreamPrerender should be set to the correct initial value");
|
||||
Services.prefs.getBoolPref(ACTIVITY_STREAM_PREF);
|
||||
});
|
||||
|
||||
/**
|
||||
* Test the overriding of the default URL
|
||||
*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче