let tab = gBrowser.getTabForBrowser(browser);
await BrowserTestUtils.crashFrame(browser);
let doc = browser.contentDocument;
// Since about:tabcrashed will run in the parent process, we can safely // manipulate its DOM nodes directly
let comments = doc.getElementById("comments");
let includeURL = doc.getElementById("includeURL");
if (fieldValues.hasOwnProperty("comments")) {
comments.value = fieldValues.comments;
}
if (fieldValues.hasOwnProperty("includeURL")) {
includeURL.checked = fieldValues.includeURL;
}
let crashReport = shouldFail
? promiseCrashReportFail()
: promiseCrashReport(expectedExtra);
let restoreTab = browser.contentDocument.getElementById("restoreTab");
restoreTab.click();
await BrowserTestUtils.waitForEvent(tab, "SSTabRestored");
await crashReport;
// Submitting the crash report may have set some prefs regarding how to // send tab crash reports. Let's reset them for the next test.
prefs.setBoolPref("sendReport", originalSendReport);
prefs.setBoolPref("includeURL", originalIncludeURL);
}
);
}
add_task(async function test_send_error() {
let successBefore = Glean.crashSubmission.success.testGetValue();
let failureBefore = Glean.crashSubmission.failure.testGetValue();
Assert.equal( null,
Glean.crashSubmission.collectorErrors.unknown_error.testGetValue()
);
let invalidAnnotation =
Glean.crashSubmission.collectorErrors.malformed_invalid_annotation_value_400.testGetValue();
add_task(async function test_send_error_server() {
let successBefore = Glean.crashSubmission.success.testGetValue();
let failureBefore = Glean.crashSubmission.failure.testGetValue();
let unknownError503 =
Glean.crashSubmission.collectorErrors.unknown_error_503.testGetValue();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.