Files
firefox/devtools/client/inspector/layout/test
Sami Jaktholm b73bc61d46 Bug 1288213 - Fix and re-enable intermittent layout view tests. r=gl
The reason for the intermittent timeouts wasn't actually in the layoutview but
in the computed view instead. It turns out computed view didn't handle
selection change during an ongoing update from previous selection change
correctly. When layout view was moved to the computed view, it caused more
things to happen during selection change which slowed the computed view
updates triggering this race condition.

Whenever selection changed, the previous update was canceled but the
promise that was blocking the inspector-updated event from being emitted
was never resolved nor rejected. This together with the fact that the
layoutview tests didn't properly wait for the initial update after
navigation / reload to finish before they triggered a new upload lead
to the inspector update to hang waiting for the inspector-updated event
and the test to timeout.

These changes fix the issues by rejecting the computed-view updated promise
whenever the update is canceled. This unblocks the inspector-updated event
to be emitted once the selection change has finished and stops the tests
from timing out.

MozReview-Commit-ID: H4cakxkm4vX
2016-08-11 18:41:01 +03:00
..
…