mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1489219 - Wait until runtime page is ready;r=daisuke,ladybenko
--HG-- extra : rebase_source : df649e78f4cc0056962fde3dc77f3e2bf938983b
This commit is contained in:
parent
eef1913bcb
commit
bbfd3d0bae
@ -21,13 +21,13 @@ function selectPage(page) {
|
||||
return;
|
||||
}
|
||||
|
||||
dispatch({ type: PAGE_SELECTED, page });
|
||||
|
||||
if (page === PAGES.THIS_FIREFOX) {
|
||||
dispatch(Actions.connectRuntime());
|
||||
await dispatch(Actions.connectRuntime());
|
||||
} else {
|
||||
dispatch(Actions.disconnectRuntime());
|
||||
await dispatch(Actions.disconnectRuntime());
|
||||
}
|
||||
|
||||
dispatch({ type: PAGE_SELECTED, page });
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ class RuntimePage extends PureComponent {
|
||||
|
||||
return dom.article(
|
||||
{
|
||||
className: "page",
|
||||
className: "page js-runtime-page",
|
||||
},
|
||||
RuntimeInfo({
|
||||
icon: "chrome://branding/content/icon64.png",
|
||||
|
@ -18,7 +18,10 @@ const EXPECTED_TARGET_PANES = [
|
||||
];
|
||||
|
||||
add_task(async function() {
|
||||
const { document } = await openAboutDebugging();
|
||||
const { document, tab } = await openAboutDebugging();
|
||||
|
||||
// Wait until the client connection was established.
|
||||
await waitUntil(() => document.querySelector(".js-runtime-page"));
|
||||
|
||||
// Check that the selected sidebar item is "This Firefox"
|
||||
const selectedSidebarItem = document.querySelector(".js-sidebar-item-selected");
|
||||
@ -36,4 +39,6 @@ add_task(async function() {
|
||||
ok(paneTitles.includes(expectedPane),
|
||||
"Expected debug target category found: " + expectedPane);
|
||||
});
|
||||
|
||||
await removeTab(tab);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user