Part 9 - Bug 951662 - make tests handle the case where the update log has previous update text at the start of the log. r=bbondy

This commit is contained in:
Robert Strong 2014-01-12 13:46:56 -08:00
Родитель cfb3cff639
Коммит c709b77828
1 изменённых файлов: 3 добавлений и 0 удалений

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

@ -1765,6 +1765,9 @@ function checkUpdateLogContents(aCompareLogFile) {
updateLogContents = updateLogContents.replace(/\n+/g, "\n"); updateLogContents = updateLogContents.replace(/\n+/g, "\n");
// Remove leading and trailing newlines // Remove leading and trailing newlines
updateLogContents = updateLogContents.replace(/^\n|\n$/g, ""); updateLogContents = updateLogContents.replace(/^\n|\n$/g, "");
// The update log when running the service tests sometimes starts with data
// from the previous launch of the updater.
updateLogContents = updateLogContents.replace(/^calling QuitProgressUI\n[^\n]*\nUPDATE TYPE/g, "UPDATE TYPE");
let compareLog = getTestDirFile(aCompareLogFile); let compareLog = getTestDirFile(aCompareLogFile);
let compareLogContents = readFileBytes(compareLog); let compareLogContents = readFileBytes(compareLog);