зеркало из https://github.com/mozilla/gecko-dev.git
Bug 527622 - test_sorting.js should wait for clear history. a=dietrich
This commit is contained in:
Родитель
cd4145881c
Коммит
badad6cd50
|
@ -1214,10 +1214,14 @@ tests.push({
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
function prepare_for_next_test() {
|
function prepare_and_run_next_test(aTest) {
|
||||||
|
aTest.setup();
|
||||||
|
aTest.check();
|
||||||
|
// sorting reversed, usually SORT_BY have ASC and DESC
|
||||||
|
aTest.check_reverse();
|
||||||
// Execute cleanup tasks
|
// Execute cleanup tasks
|
||||||
PlacesUtils.bhistory.removeAllPages();
|
|
||||||
remove_all_bookmarks();
|
remove_all_bookmarks();
|
||||||
|
waitForClearHistory(runNextTest);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1226,13 +1230,16 @@ function prepare_for_next_test() {
|
||||||
* playing with the result set.
|
* playing with the result set.
|
||||||
*/
|
*/
|
||||||
function run_test() {
|
function run_test() {
|
||||||
prepare_for_next_test();
|
do_test_pending();
|
||||||
while (tests.length) {
|
runNextTest();
|
||||||
|
}
|
||||||
|
|
||||||
|
function runNextTest() {
|
||||||
|
if (tests.length) {
|
||||||
let test = tests.shift();
|
let test = tests.shift();
|
||||||
test.setup();
|
prepare_and_run_next_test(test);
|
||||||
test.check();
|
}
|
||||||
// sorting reversed, usually SORT_BY have ASC and DESC
|
else {
|
||||||
test.check_reverse();
|
do_test_finished();
|
||||||
prepare_for_next_test();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче