Open Bug 1662503 Opened 5 years ago Updated 8 months ago

Use only one helper to wait for a condition in devtools tests

Categories

(DevTools :: General, task, P3)

task

Tracking

(Not tracked)

People

(Reporter: ochameau, Unassigned)

References

(Blocks 1 open bug)

Details

Today, DevTools codebase uses XXX helpers to wait for an async condition to become true:

waitFor and waitUntil are used a lot, the others, much less.

waitUntil never throws, waitFor is probably more helpful for debugging failure, especially after your patch lands.
Also, waitFor supports async conditions, so i guess we could directly replace asyncWaitUntil with waitFor?

I see two options from here:

  • migrate everything to waitFor. It would still be a devtools specific helper
  • migrate everything to BrowserTestUtils.waitForCondition. Then devtools would just use same helper as the rest of mozilla-central

The issue with the second is that we would miss the small tweak of bug 1662066, which displays the stack trace and the condition function in case of failure.

Depends on: 1662066

Note that waitUntil doesn't timeout, so when migrating from waitUntil to waitFor we might lever new times of intermittents.

Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.