Closed Bug 1167181 Opened 9 years ago Closed 9 years ago

Many computed view tests don't wait for rule update to finish before proceeding

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(firefox41 fixed)

RESOLVED FIXED
Firefox 41
Tracking Status
firefox41 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(2 files)

Bug 1161072 identified that some getOriginalLocation request were done after the tests was declared as done!
That's because many browser_computer_*.js tests are not waiting for the SelectorView instances to be done loading, especially the updateSourceLink call in its constructor, which ends up dispatching a getOriginalLocation.

We should ensure waiting for all stuff to be done with each test before proceeding to the next one!
Blocks: 1161072
Comment on attachment 8608699 [details] [diff] [review]
patch

Review of attachment 8608699 [details] [diff] [review]:
-----------------------------------------------------------------

computed-view-property-expanded was fired too early, before SelectorView finished initializing and especially finished its getOriginalLocation request.
Attachment #8608699 - Flags: review?(pbrosset)
Comment on attachment 8608699 [details] [diff] [review]
patch

Review of attachment 8608699 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good.
Attachment #8608699 - Flags: review?(pbrosset) → review+
This patch is not enough, browser/devtools/styleinspector/test/browser_computedview_matched-selectors_01.js still dispatch some getOriginalLocation requests on shutdown.
Keywords: leave-open
Attached patch second fix (deleted) — Splinter Review
https://treeherder.mozilla.org/#/jobs?repo=try&revision=0965450679c4

Looks like I also need to delay the promise returned by refreshMatchedSelectors
as it is being called by test without waiting for computed-view-property-expanded event.
Attachment #8610531 - Flags: review?(pbrosset)
Attachment #8610531 - Flags: review?(pbrosset) → review+
Keywords: leave-open
https://hg.mozilla.org/mozilla-central/rev/f78cdc1f29ed
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: