Bug 529979 - Intermittent failure in browser_aboutCrashesResubmit.js, r=ted, a=test

This commit is contained in:
Hiroyuki Ikezoe 2010-12-31 20:22:00 -08:00
Родитель 12030ea7ec
Коммит dff4744c8a
2 изменённых файлов: 9 добавлений и 8 удалений

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

@ -108,10 +108,9 @@ function writeDataToFile(file, data) {
fstream.close();
}
function addPendingCrashreport(crD, extra) {
function addPendingCrashreport(crD, date, extra) {
let pendingdir = crD.clone();
pendingdir.append("pending");
let date = Date.now() - Math.round(Math.random() * 10 * 60000);
let uuidGenerator = Cc["@mozilla.org/uuid-generator;1"]
.getService(Ci.nsIUUIDGenerator);
let uuid = uuidGenerator.generateUUID().toString();

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

@ -126,7 +126,9 @@ function test() {
crD.append("Crash Reports");
let crashes = add_fake_crashes(crD, 1);
// we don't need much data here, it's not going to a real Socorro
crashes.push(addPendingCrashreport(crD, {'ServerURL': 'http://example.com/browser/toolkit/crashreporter/test/browser/crashreport.sjs',
crashes.push(addPendingCrashreport(crD,
crashes[crashes.length - 1].date + 60000,
{'ServerURL': 'http://example.com/browser/toolkit/crashreporter/test/browser/crashreport.sjs',
'ProductName': 'Test App',
// test that we don't truncate
// at = (bug 512853)