Bug 1060084 - Remove the created report files in browser_pluginCrashCommentAndURL.js. r=jaws

This commit is contained in:
Birunthan Mohanathas 2014-09-03 12:14:31 -07:00
Родитель 76f2971034
Коммит 4a3be1daaf
2 изменённых файлов: 18 добавлений и 5 удалений

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

@ -109,9 +109,9 @@ function onSubmitStatus(subj, topic, data) {
ok(!!remoteID, "serverCrashID should be set");
// Remove the submitted report file.
let file = Services.dirsvc.get("UAppData", Ci.nsILocalFile);
file.append("Crash Reports");
file.append("submitted");
let file = Cc["@mozilla.org/file/local;1"]
.createInstance(Ci.nsILocalFile);
file.initWithPath(Services.crashmanager._submittedDumpsDir);
file.append(remoteID + ".txt");
ok(file.exists(), "Submitted report file should exist");
file.remove(false);

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

@ -116,8 +116,21 @@ function onSubmitStatus(subj, topic, data) {
if (data != "success" && data != "failed")
return;
let extra = getPropertyBagValue(subj.QueryInterface(Ci.nsIPropertyBag),
"extra");
let propBag = subj.QueryInterface(Ci.nsIPropertyBag);
if (data == "success") {
let remoteID = getPropertyBagValue(propBag, "serverCrashID");
ok(!!remoteID, "serverCrashID should be set");
// Remove the submitted report file.
let file = Cc["@mozilla.org/file/local;1"]
.createInstance(Ci.nsILocalFile);
file.initWithPath(Services.crashmanager._submittedDumpsDir);
file.append(remoteID + ".txt");
ok(file.exists(), "Submitted report file should exist");
file.remove(false);
}
let extra = getPropertyBagValue(propBag, "extra");
ok(extra instanceof Ci.nsIPropertyBag, "Extra data should be property bag");
let val = getPropertyBagValue(extra, "PluginUserComment");