зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1756757 - [devtools] Use wait instead of waitForTime. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D139482
This commit is contained in:
Родитель
d1792a86b7
Коммит
560fbd9491
|
@ -121,7 +121,7 @@ add_task(async function testReloadingStableOriginalSource() {
|
|||
|
||||
// There will initially be zero breakpoints, but wait to make sure none are
|
||||
// installed while syncing.
|
||||
await waitForTime(1000);
|
||||
await wait(1000);
|
||||
|
||||
assertNotPaused(dbg);
|
||||
is(dbg.selectors.getBreakpointCount(dbg), 0, "No breakpoints");
|
||||
|
|
|
@ -37,7 +37,7 @@ add_task(async function() {
|
|||
});
|
||||
|
||||
async function assertNoTooltip(dbg) {
|
||||
await waitForTime(200);
|
||||
await wait(200);
|
||||
const el = findElement(dbg, "tooltip");
|
||||
is(el, null, "Tooltip should not exist");
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ add_task(async function() {
|
|||
|
||||
// Wait for some time, in order to wait for it to be paused
|
||||
// in case we regress
|
||||
await waitForTime(1000);
|
||||
await wait(1000);
|
||||
|
||||
assertNotPaused(dbg);
|
||||
});
|
||||
|
|
|
@ -524,16 +524,6 @@ async function waitForPausedThread(dbg, thread) {
|
|||
return waitForState(dbg, state => dbg.selectors.getIsPaused(thread));
|
||||
}
|
||||
|
||||
/*
|
||||
* useful for waiting for a short amount of time as
|
||||
* a placeholder for a better waitForX handler.
|
||||
*
|
||||
* e.g await waitForTime(500)
|
||||
*/
|
||||
function waitForTime(ms) {
|
||||
return new Promise(r => setTimeout(r, ms));
|
||||
}
|
||||
|
||||
function isSelectedFrameSelected(dbg, state) {
|
||||
const frame = dbg.selectors.getVisibleSelectedFrame();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче