Bug 608431: Wait for window close before proceeding with tests. r=robstrong, a=tests

This commit is contained in:
Dave Townsend 2010-11-03 12:47:03 -07:00
Родитель f8a6778aaf
Коммит a2e50c5839
1 изменённых файлов: 18 добавлений и 11 удалений

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

@ -234,6 +234,7 @@ add_test(function() {
ok(!button.disabled, "Finish button should not be disabled"); ok(!button.disabled, "Finish button should not be disabled");
EventUtils.synthesizeMouse(button, 2, 2, { }, aWindow); EventUtils.synthesizeMouse(button, 2, 2, { }, aWindow);
wait_for_window_close(aWindow, function() {
AddonManager.getAddonsByIDs(["addon8@tests.mozilla.org", AddonManager.getAddonsByIDs(["addon8@tests.mozilla.org",
"addon9@tests.mozilla.org"], "addon9@tests.mozilla.org"],
function([a8, a9]) { function([a8, a9]) {
@ -248,6 +249,7 @@ add_test(function() {
}); });
}); });
}); });
});
}); });
// Tests that the install failures show the install failed page and disabling // Tests that the install failures show the install failed page and disabling
@ -317,10 +319,12 @@ add_test(function() {
ok(!button.hidden, "Finish button should not be hidden"); ok(!button.hidden, "Finish button should not be hidden");
ok(!button.disabled, "Finish button should not be disabled"); ok(!button.disabled, "Finish button should not be disabled");
EventUtils.synthesizeMouse(button, 2, 2, { }, aWindow); wait_for_window_close(aWindow, function() {
uninstall_test_addons(run_next_test); uninstall_test_addons(run_next_test);
}); });
EventUtils.synthesizeMouse(button, 2, 2, { }, aWindow);
});
}); });
}); });
}); });
@ -400,10 +404,13 @@ add_test(function() {
var button = doc.documentElement.getButton("finish"); var button = doc.documentElement.getButton("finish");
ok(!button.hidden, "Finish button should not be hidden"); ok(!button.hidden, "Finish button should not be hidden");
ok(!button.disabled, "Finish button should not be disabled"); ok(!button.disabled, "Finish button should not be disabled");
EventUtils.synthesizeMouse(button, 2, 2, { }, aWindow);
wait_for_window_close(aWindow, function() {
uninstall_test_addons(run_next_test); uninstall_test_addons(run_next_test);
}); });
EventUtils.synthesizeMouse(button, 2, 2, { }, aWindow);
});
}); });
}); });
}); });