mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1242907 - Fix broken about:crashes due to typo in ContentCrashHandlers.jsm. r=mconley
This commit is contained in:
parent
0d1602960e
commit
140c8d06ec
@ -543,3 +543,5 @@ skip-if = !e10s || !crashreporter
|
||||
skip-if = !e10s || !crashreporter
|
||||
[browser_aboutTabCrashed_showForm.js]
|
||||
skip-if = !e10s || !crashreporter
|
||||
[browser_aboutTabCrashed_withoutDump.js]
|
||||
skip-if = !e10s
|
||||
|
@ -0,0 +1,44 @@
|
||||
"use strict";
|
||||
|
||||
const PAGE = "data:text/html,<html><body>A%20regular,%20everyday,%20normal%20page.";
|
||||
|
||||
/**
|
||||
* Monkey patches TabCrashHandler.getDumpID to return null in order to test
|
||||
* about:tabcrashed when a dump is not available.
|
||||
*/
|
||||
add_task(function* setup() {
|
||||
let originalGetDumpID = TabCrashHandler.getDumpID;
|
||||
TabCrashHandler.getDumpID = function(browser) { return null; };
|
||||
registerCleanupFunction(() => {
|
||||
TabCrashHandler.getDumpID = originalGetDumpID;
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Tests tab crash page when a dump is not available.
|
||||
*/
|
||||
add_task(function* test_without_dump() {
|
||||
return BrowserTestUtils.withNewTab({
|
||||
gBrowser,
|
||||
url: PAGE,
|
||||
}, function*(browser) {
|
||||
let tab = gBrowser.getTabForBrowser(browser);
|
||||
yield BrowserTestUtils.crashBrowser(browser);
|
||||
|
||||
let tabRemovedPromise = BrowserTestUtils.removeTab(tab, { dontRemove: true });
|
||||
|
||||
yield ContentTask.spawn(browser, null, function*() {
|
||||
let doc = content.document;
|
||||
ok(!doc.documentElement.classList.contains("crashDumpAvailable"),
|
||||
"doesn't have crash dump");
|
||||
|
||||
let container = doc.getElementById("crash-reporter-container");
|
||||
ok(container, "has crash-reporter-container");
|
||||
ok(container.hidden, "crash-reporter-container is hidden");
|
||||
|
||||
doc.getElementById("closeTab").click();
|
||||
});
|
||||
|
||||
yield tabRemovedPromise;
|
||||
});
|
||||
});
|
@ -228,7 +228,7 @@ this.TabCrashHandler = {
|
||||
|
||||
let dumpID = this.getDumpID(browser);
|
||||
if (!dumpID) {
|
||||
message.target.sendAsyncMessge("SetCrashReportAvailable", {
|
||||
message.target.sendAsyncMessage("SetCrashReportAvailable", {
|
||||
hasReport: false,
|
||||
});
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user