mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
Bug 1534304 - Proper fix for a race condition in an about:debugging test. r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D22996 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
26d5920802
commit
705d014bc8
@ -95,10 +95,6 @@ add_task(async function testUsbRuntimeUpdates() {
|
||||
info("Remove runtime 1");
|
||||
await removeUsbRuntime(USB_RUNTIME_1, mocks, document);
|
||||
|
||||
// Wait a tick for telementry events to settle. (removeUsbRuntime only waits
|
||||
// for the UI to update.)
|
||||
await undefined;
|
||||
|
||||
checkTelemetryEvents([
|
||||
{ method: "runtime_disconnected", extras: runtime1ConnectedExtras },
|
||||
{ method: "runtime_removed", extras: runtime1Extras },
|
||||
@ -130,5 +126,6 @@ async function addUsbRuntime(runtime, mocks, doc) {
|
||||
async function removeUsbRuntime(runtime, mocks, doc) {
|
||||
mocks.removeRuntime(runtime.id);
|
||||
mocks.emitUSBUpdate();
|
||||
await waitUntil(() => !findSidebarItemByText(runtime.shortName, doc));
|
||||
await waitUntil(() => !findSidebarItemByText(runtime.name, doc) &&
|
||||
!findSidebarItemByText(runtime.shortName, doc));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user