mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 529979 - Intermittent failure in browser_aboutCrashesResubmit.js, r=ted, a=test
This commit is contained in:
parent
8d4fe7465c
commit
4f1a225baa
@ -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,12 +126,14 @@ 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',
|
||||
'ProductName': 'Test App',
|
||||
// test that we don't truncate
|
||||
// at = (bug 512853)
|
||||
'Foo': 'ABC=XYZ'
|
||||
}));
|
||||
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)
|
||||
'Foo': 'ABC=XYZ'
|
||||
}));
|
||||
crashes.sort(function(a,b) b.date - a.date);
|
||||
|
||||
// set this pref so we can link to our test server
|
||||
|
Loading…
Reference in New Issue
Block a user