зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1579042
- Fix race condition in tests after introducing tab descriptors r=ochameau
Depends on D63503 Differential Revision: https://phabricator.services.mozilla.com/D63504 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
b55ae3db68
Коммит
2070a97ab6
|
@ -61,11 +61,13 @@ add_task(async function() {
|
|||
"so that the about:devtools-toolbox tab loses focus"
|
||||
);
|
||||
newNavigator.gBrowser.selectedTab = newNavigator.gBrowser.addTab(
|
||||
"about:blank",
|
||||
"data:text/html,<title>TEST_TAB</title>",
|
||||
{
|
||||
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||
}
|
||||
);
|
||||
await waitUntil(() => findDebugTargetByText("TEST_TAB", document));
|
||||
|
||||
clickInspectButton(inspectionTarget, document);
|
||||
assertDevtoolsToolboxTabState(devtoolsURL);
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@ add_task(async function() {
|
|||
|
||||
info("closing the toolbox");
|
||||
await removeTab(devtoolsTab);
|
||||
await waitUntil(() => !findDebugTargetByText("Toolbox -", document));
|
||||
|
||||
info("removing about:debugging tab");
|
||||
await removeTab(tab);
|
||||
});
|
||||
|
|
|
@ -53,6 +53,7 @@ async function testMainProcessTarget(name, description) {
|
|||
await selectRuntime(RUNTIME_DEVICE_NAME, RUNTIME_APP_NAME, document);
|
||||
|
||||
info("Check debug target item of the main process");
|
||||
await waitUntil(() => findDebugTargetByText(name, document));
|
||||
const mainProcessItem = findDebugTargetByText(name, document);
|
||||
ok(mainProcessItem, "Debug target item of the main process should display");
|
||||
ok(
|
||||
|
|
|
@ -311,12 +311,18 @@ async function connectToRuntime(deviceName, document) {
|
|||
|
||||
async function selectRuntime(deviceName, name, document) {
|
||||
const sidebarItem = findSidebarItemByText(deviceName, document);
|
||||
const store = document.defaultView.AboutDebugging.store;
|
||||
const onSelectPageSuccess = waitForDispatch(store, "SELECT_PAGE_SUCCESS");
|
||||
|
||||
sidebarItem.querySelector(".qa-sidebar-link").click();
|
||||
|
||||
await waitUntil(() => {
|
||||
const runtimeInfo = document.querySelector(".qa-runtime-name");
|
||||
return runtimeInfo && runtimeInfo.textContent.includes(name);
|
||||
});
|
||||
|
||||
info("Wait for SELECT_PAGE_SUCCESS to be dispatched");
|
||||
await onSelectPageSuccess;
|
||||
}
|
||||
|
||||
function getToolbox(win) {
|
||||
|
|
|
@ -83,7 +83,7 @@ function testAttachRemovedTab() {
|
|||
deferred.reject();
|
||||
});
|
||||
|
||||
gTab2Front.attach().then(null, error => {
|
||||
gTab2Front.reconfigure({}).then(null, error => {
|
||||
ok(
|
||||
error.message.includes("noSuchActor"),
|
||||
"Actor is gone since the tab was removed."
|
||||
|
|
Загрузка…
Ссылка в новой задаче