Bug 645918: attempt to fix random orange in test_bookmarks_engine. r=philiKON

This commit is contained in:
Richard Newman 2011-04-19 12:30:39 -07:00
Родитель a48b523fb3
Коммит 1a3e4d7706
1 изменённых файлов: 13 добавлений и 18 удалений

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

@ -14,7 +14,7 @@ function makeEngine() {
}
var syncTesting = new SyncTestingInfrastructure(makeEngine);
function test_ID_caching() {
add_test(function test_ID_caching() {
_("Ensure that Places IDs are not cached.");
let engine = new BookmarksEngine();
@ -50,12 +50,12 @@ function test_ID_caching() {
do_check_eq(newMobileID, store.idForGUID("mobile", false));
do_check_eq(store.GUIDForId(mobileID), "abcdefghijkl");
}
run_next_test();
});
function test_processIncoming_error_orderChildren() {
add_test(function test_processIncoming_error_orderChildren() {
_("Ensure that _orderChildren() is called even when _processIncoming() throws an error.");
do_test_pending();
Svc.Prefs.set("clusterURL", "http://localhost:8080/");
Svc.Prefs.set("username", "foo");
@ -126,16 +126,15 @@ function test_processIncoming_error_orderChildren() {
} finally {
store.wipe();
server.stop(do_test_finished);
Svc.Prefs.resetBranch("");
Records.clearCache();
syncTesting = new SyncTestingInfrastructure(makeEngine);
server.stop(run_next_test);
}
}
});
function test_restorePromptsReupload() {
add_test(function test_restorePromptsReupload() {
_("Ensure that restoring from a backup will reupload all records.");
do_test_pending();
Svc.Prefs.set("username", "foo");
Service.serverURL = "http://localhost:8080/";
Service.clusterURL = "http://localhost:8080/";
@ -266,15 +265,15 @@ function test_restorePromptsReupload() {
} finally {
store.wipe();
server.stop(do_test_finished);
Svc.Prefs.resetBranch("");
Records.clearCache();
syncTesting = new SyncTestingInfrastructure(makeEngine);
server.stop(run_next_test);
}
}
});
// Bug 632287.
function test_mismatched_types() {
add_test(function test_mismatched_types() {
_("Ensure that handling a record that changes type causes deletion " +
"then re-adding.");
@ -309,7 +308,6 @@ function test_mismatched_types() {
"parentid": "toolbar"
};
do_test_pending();
Svc.Prefs.set("username", "foo");
Service.serverURL = "http://localhost:8080/";
Service.clusterURL = "http://localhost:8080/";
@ -351,12 +349,12 @@ function test_mismatched_types() {
} finally {
store.wipe();
server.stop(do_test_finished);
Svc.Prefs.resetBranch("");
Records.clearCache();
syncTesting = new SyncTestingInfrastructure(makeEngine);
server.stop(run_next_test);
}
}
});
function run_test() {
initTestLogging("Trace");
@ -364,8 +362,5 @@ function run_test() {
CollectionKeys.generateNewKeys();
test_processIncoming_error_orderChildren();
test_ID_caching();
test_mismatched_types();
test_restorePromptsReupload();
run_next_test();
}