зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1620280 - [devtools] Explicitely wait for toolbox destruction in a few tests. r=jdescottes
Without that, we are closing the toolbox by destroying its tab or window. This prevent correctly waiting for toolbox full destruction and was causing leaks in debug builds on browser_webconsole_trackingprotection_errors.js and browser_aboutdebugging_devtools.js. Differential Revision: https://phabricator.services.mozilla.com/D91917
This commit is contained in:
Родитель
2c5b9717e7
Коммит
fa2ab74326
|
@ -42,5 +42,10 @@ add_task(async function() {
|
|||
const markupViewElement = inspector.panelDoc.getElementById("markup-box");
|
||||
ok(markupViewElement, "Inspector is still rendered");
|
||||
|
||||
// We explicitely destroy the toolbox in order to ensure waiting for its full destruction
|
||||
// and avoid leak / pending requests
|
||||
info("Destroy the opened toolbox");
|
||||
await toolbox.destroy();
|
||||
|
||||
await removeTab(tab);
|
||||
});
|
||||
|
|
|
@ -94,6 +94,9 @@ add_task(async function testForeignCookieBlockedMessage() {
|
|||
message,
|
||||
getStorageErrorUrl("CookieBlockedForeign")
|
||||
);
|
||||
// We explicitely destroy the toolbox in order to ensure waiting for its full destruction
|
||||
// and avoid leak / pending requests
|
||||
await hud.toolbox.destroy();
|
||||
win.close();
|
||||
});
|
||||
|
||||
|
@ -124,6 +127,9 @@ add_task(async function testLimitForeignCookieBlockedMessage() {
|
|||
message,
|
||||
getStorageErrorUrl("CookieBlockedForeign")
|
||||
);
|
||||
// We explicitely destroy the toolbox in order to ensure waiting for its full destruction
|
||||
// and avoid leak / pending requests
|
||||
await hud.toolbox.destroy();
|
||||
win.close();
|
||||
});
|
||||
|
||||
|
@ -144,6 +150,9 @@ add_task(async function testAllCookieBlockedMessage() {
|
|||
message,
|
||||
getStorageErrorUrl("CookieBlockedAll")
|
||||
);
|
||||
// We explicitely destroy the toolbox in order to ensure waiting for its full destruction
|
||||
// and avoid leak / pending requests
|
||||
await hud.toolbox.destroy();
|
||||
win.close();
|
||||
});
|
||||
|
||||
|
@ -164,6 +173,9 @@ add_task(async function testTrackerCookieBlockedMessage() {
|
|||
message,
|
||||
getStorageErrorUrl("CookieBlockedTracker")
|
||||
);
|
||||
// We explicitely destroy the toolbox in order to ensure waiting for its full destruction
|
||||
// and avoid leak / pending requests
|
||||
await hud.toolbox.destroy();
|
||||
win.close();
|
||||
});
|
||||
|
||||
|
@ -184,6 +196,9 @@ add_task(async function testForeignCookiePartitionedMessage() {
|
|||
message,
|
||||
getStorageErrorUrl("CookiePartitionedForeign")
|
||||
);
|
||||
// We explicitely destroy the toolbox in order to ensure waiting for its full destruction
|
||||
// and avoid leak / pending requests
|
||||
await hud.toolbox.destroy();
|
||||
win.close();
|
||||
});
|
||||
|
||||
|
@ -212,6 +227,9 @@ add_task(async function testCookieBlockedByPermissionMessage() {
|
|||
message,
|
||||
getStorageErrorUrl("CookieBlockedByPermission")
|
||||
);
|
||||
// We explicitely destroy the toolbox in order to ensure waiting for its full destruction
|
||||
// and avoid leak / pending requests
|
||||
await hud.toolbox.destroy();
|
||||
win.close();
|
||||
|
||||
// Remove the custom permission.
|
||||
|
|
Загрузка…
Ссылка в новой задаче