зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1060084 - Remove the created report files in browser_pluginCrashCommentAndURL.js. r=jaws
This commit is contained in:
Родитель
76f2971034
Коммит
4a3be1daaf
|
@ -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");
|
||||
|
|
Загрузка…
Ссылка в новой задаче