зеркало из https://github.com/mozilla/gecko-dev.git
bug 512479 - make pending crash reports more identifiable, r=mconley
MozReview-Commit-ID: BQ5Ds0wsXvb --HG-- extra : rebase_source : 7c73f1f7316827750a951e19dc3e0f8adafd70cb
This commit is contained in:
Родитель
9521db52b6
Коммит
9acd0ac081
|
@ -80,7 +80,6 @@ function populateReportList() {
|
|||
|
||||
var formatter = Cc["@mozilla.org/intl/scriptabledateformat;1"].
|
||||
createInstance(Ci.nsIScriptableDateFormat);
|
||||
var body = document.getElementById("tbody");
|
||||
var ios = Cc["@mozilla.org/network/io-service;1"].
|
||||
getService(Ci.nsIIOService);
|
||||
var reportURI = ios.newURI(reportURL, null, null);
|
||||
|
@ -100,6 +99,7 @@ function populateReportList() {
|
|||
link.setAttribute("href", reportURL + reports[i].id);
|
||||
}
|
||||
link.setAttribute("id", reports[i].id);
|
||||
link.classList.add("crashReport");
|
||||
link.appendChild(document.createTextNode(reports[i].id));
|
||||
cell.appendChild(link);
|
||||
|
||||
|
@ -120,7 +120,11 @@ function populateReportList() {
|
|||
date.getSeconds());
|
||||
cell.appendChild(document.createTextNode(timestr));
|
||||
row.appendChild(cell);
|
||||
body.appendChild(row);
|
||||
if (reports[i].pending) {
|
||||
document.getElementById("unsubmitted").appendChild(row);
|
||||
} else {
|
||||
document.getElementById("submitted").appendChild(row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -85,22 +85,37 @@ td:last-child {
|
|||
href="chrome://global/skin/in-content/common.css"/>
|
||||
<script type="application/javascript;version=1.8" src="chrome://global/content/crashes.js"/>
|
||||
|
||||
<title>&crashes.title;</title>
|
||||
<title>&crashReports.title;</title>
|
||||
</head><body onload="populateReportList()" dir="&locale.dir;">
|
||||
<button chromedir="&locale.dir;" id="clear-reports"
|
||||
onclick="clearReports().then(null, Cu.reportError)">&clearAllReports.label;</button>
|
||||
<h1>&crashes.title;</h1>
|
||||
<div id="reportList">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th chromedir="&locale.dir;">&id.heading;</th>
|
||||
<th chromedir="&locale.dir;" colspan="2">&date.heading;</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="reportListUnsubmitted">
|
||||
<h1>&crashesUnsubmitted.label;</h1>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th chromedir="&locale.dir;">&id.heading;</th>
|
||||
<th chromedir="&locale.dir;" colspan="2">&dateCrashed.heading;</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="unsubmitted">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="reportListSubmitted">
|
||||
<h1>&crashesSubmitted.label;</h1>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th chromedir="&locale.dir;">&id.heading;</th>
|
||||
<th chromedir="&locale.dir;" colspan="2">&dateSubmitted.heading;</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="submitted">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<p id="noReports" style="display: none">&noReports.label;</p>
|
||||
<p id="noConfig" style="display: none">&noConfig.label;</p>
|
||||
|
|
|
@ -13,7 +13,7 @@ add_task(function* test() {
|
|||
info("about:crashes loaded");
|
||||
return ContentTask.spawn(browser, crashes, function (crashes) {
|
||||
let doc = content.document;
|
||||
let crashlinks = doc.getElementById("tbody").getElementsByTagName("a");
|
||||
let crashlinks = doc.getElementById("submitted").querySelectorAll(".crashReport");
|
||||
Assert.equal(crashlinks.length, crashes.length,
|
||||
"about:crashes lists correct number of crash reports");
|
||||
for (let i = 0; i < crashes.length; i++) {
|
||||
|
|
|
@ -16,7 +16,7 @@ function cleanup_and_finish() {
|
|||
*/
|
||||
function check_crash_list(crashes) {
|
||||
let doc = content.document;
|
||||
let crashlinks = doc.getElementById("tbody").getElementsByTagName("a");
|
||||
let crashlinks = doc.getElementsByClassName("crashReport");
|
||||
Assert.equal(crashlinks.length, crashes.length,
|
||||
"about:crashes lists correct number of crash reports");
|
||||
// no point in checking this if the lists aren't the same length
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!ENTITY crashes.title "Submitted Crash Reports">
|
||||
<!ENTITY crashReports.title "Crash Reports">
|
||||
<!ENTITY crashesUnsubmitted.label "Unsubmitted Crash Reports">
|
||||
<!ENTITY crashesSubmitted.label "Submitted Crash Reports">
|
||||
<!ENTITY id.heading "Report ID">
|
||||
<!ENTITY date.heading "Date Submitted">
|
||||
<!ENTITY dateCrashed.heading "Date Crashed">
|
||||
<!ENTITY dateSubmitted.heading "Date Submitted">
|
||||
<!ENTITY noReports.label "No crash reports have been submitted.">
|
||||
<!ENTITY noConfig.label "This application has not been configured to display crash reports. The preference <code>breakpad.reportURL</code> must be set.">
|
||||
<!ENTITY clearAllReports.label "Remove All Reports">
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче