Closed Bug 1778985 Opened 3 months ago Closed 2 months ago

Add a `wait` option for the test helper `getRuleViewProperty` to wait until the element is available

Categories

(DevTools :: Inspector: Rules, task, P3)

task

Tracking

(firefox104 fixed)

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We had several intermittent failures when using getRuleViewProperty: Bug 1767679, Bug 1767684.

They usually seem to occur on Linux, and when the rule view needs to render widgets such as swatches, although it's not really clear what triggers the issue.

We suspect that something delays the inspector initialization, and for the time being it would be great to have a wait argument on the getRuleViewProperty so that we can quickly wait on the required element to be available.

We could make this the default behavior as well.

We have a new failure for the same kind of issue, so let's go ahead and implement this

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED

Update the test helper getRuleViewProperty to support an async version via a wait option.
When passed, the helper will keep polling until there is a valid ruleviewproperty which matches the arguments.
This can avoid race issues when the API is used too early.

In this changeset we also start using this API in all tests which either:

  • used to manually poll getRuleViewProperty
  • were disabled on linux for getRuleViewProperty issues
  • are currently intermittent because of getRuleViewProperty
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c9960e3f58b7
[devtools] Add `wait` option to `getRuleViewProperty` r=Honza,nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.