зеркало из https://github.com/mozilla/gecko-dev.git
Bug 602872 - Some Places xpcshell tests are failing due to idle-daily notified for each test. r=mak a=orange
This commit is contained in:
Родитель
4850b5f10e
Коммит
59a6317501
|
@ -508,3 +508,21 @@ let (randomFailingSyncTests = [
|
|||
sync.observe(null, "places-debug-stop-sync", null);
|
||||
}
|
||||
}
|
||||
|
||||
// These tests are randomly failing if idle-daily is executed in the middle,
|
||||
// thus we make history ignore the notification for them. See bug 602872.
|
||||
let (randomFailingIdleTests = [
|
||||
"test_redirectsMode.js",
|
||||
"test_tags.js",
|
||||
"test_history_sidebar.js",
|
||||
"test_removeVisitsByTimeframe.js",
|
||||
"test_history_removeAllPages.js", // Needs stable frecency.
|
||||
"test_database_sync_after_shutdown_with_removeAllPages.js", // Needs stable frecency.
|
||||
]) {
|
||||
let currentTestFilename = do_get_file(_TEST_FILE[0], true).leafName;
|
||||
if (randomFailingIdleTests.indexOf(currentTestFilename) != -1) {
|
||||
print("Test " + currentTestFilename +
|
||||
" is known random due to idle-daily, remove observer.");
|
||||
Services.obs.removeObserver(PlacesUtils.history, "idle-daily");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -138,10 +138,6 @@ function run_test()
|
|||
{
|
||||
do_test_pending();
|
||||
|
||||
// Since we are checking frecency, we have to disable some stuff that could
|
||||
// change values during test run. On idle-daily frecencies are updated.
|
||||
Services.obs.removeObserver(PlacesUtils.history, "idle-daily");
|
||||
|
||||
// Set the preference for the timer to a really large value, so it won't
|
||||
// run before the test finishes.
|
||||
prefs.setIntPref(PREF_SYNC_INTERVAL, SYNC_INTERVAL);
|
||||
|
|
|
@ -237,10 +237,6 @@ os.addObserver(syncObserver, kSyncFinished, false);
|
|||
|
||||
// main
|
||||
function run_test() {
|
||||
// Since we are checking frecency, we have to disable some stuff that could
|
||||
// change values during test run. On idle-daily frecencies are updated.
|
||||
Services.obs.removeObserver(PlacesUtils.history, "idle-daily");
|
||||
|
||||
// Add a livemark with a visited and an unvisited child
|
||||
add_fake_livemark();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче