diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /toolkit/crashreporter/test/browser/browser_aboutCrashes.js | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'toolkit/crashreporter/test/browser/browser_aboutCrashes.js')
-rw-r--r-- | toolkit/crashreporter/test/browser/browser_aboutCrashes.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/toolkit/crashreporter/test/browser/browser_aboutCrashes.js b/toolkit/crashreporter/test/browser/browser_aboutCrashes.js new file mode 100644 index 000000000..1293df030 --- /dev/null +++ b/toolkit/crashreporter/test/browser/browser_aboutCrashes.js @@ -0,0 +1,27 @@ +add_task(function* test() { + let appD = make_fake_appdir(); + let crD = appD.clone(); + crD.append("Crash Reports"); + let crashes = add_fake_crashes(crD, 5); + // sanity check + let dirSvc = Components.classes["@mozilla.org/file/directory_service;1"] + .getService(Components.interfaces.nsIProperties); + let appDtest = dirSvc.get("UAppData", Components.interfaces.nsILocalFile); + ok(appD.equals(appDtest), "directory service provider registered ok"); + + yield BrowserTestUtils.withNewTab({ gBrowser, url: "about:crashes" }, function (browser) { + info("about:crashes loaded"); + return ContentTask.spawn(browser, crashes, function (crashes) { + let doc = content.document; + 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++) { + Assert.equal(crashlinks[i].firstChild.textContent, crashes[i].id, + i + ": crash ID is correct"); + } + }); + }); + + cleanup_fake_appdir(); +}); |