Bug 1220246 - fix test_geodefaults.js to avoid failing when the http server takes more than 1000ms to reply, r=Gijs.

This commit is contained in:
Florian Quèze 2015-11-06 15:53:11 +01:00
Родитель 672fda2c82
Коммит 11f2e3253c
1 изменённых файлов: 1 добавлений и 7 удалений

Просмотреть файл

@ -67,17 +67,11 @@ add_task(function* no_request_if_prefed_off() {
Services.prefs.setBoolPref("browser.search.geoSpecificDefaults", false);
yield asyncInit();
checkNoRequest();
yield promiseAfterCache();
// The default engine should be set based on the prefs.
do_check_eq(Services.search.currentEngine.name, getDefaultEngineName(false));
// Change the default engine and then revert to default to ensure
// the metadata file exists.
let commitPromise = promiseAfterCache();
Services.search.currentEngine = Services.search.getEngineByName(kTestEngineName);
Services.search.resetToOriginalDefaultEngine();
yield commitPromise;
// Ensure nothing related to geoSpecificDefaults has been written in the metadata.
let metadata = yield promiseGlobalMetadata();
do_check_eq(typeof metadata.searchDefaultExpir, "undefined");