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
parent 27483bfe2f
commit 5421332a61

View File

@ -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);