Closed Bug 1430408 Opened 6 years ago Closed 6 years ago

devtools/client/debugger/test/mochitest/browser_dbg_instruments-pane-collapse_keyboard.js fails after bug 1193394

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(firefox59 fixed)

RESOLVED FIXED
Firefox 59
Tracking Status
firefox59 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(2 files)

https://treeherder.mozilla.org/#/jobs?repo=try&revision=c7b7ba9086f5524823ea95f717f4bfbe0430313a&filter-searchStr=dt&selectedJob=154669287
> TEST-UNEXPECTED-FAIL | devtools/client/debugger/test/mochitest/browser_dbg_instruments-pane-collapse_keyboard.js | The instruments panel is in the collapsed state -

https://searchfox.org/mozilla-central/rev/7476b71e0010ab3277b77cc0ae4d998c4b1d2b64/devtools/client/debugger/test/mochitest/browser_dbg_instruments-pane-collapse_keyboard.js#34

https://searchfox.org/mozilla-central/rev/7476b71e0010ab3277b77cc0ae4d998c4b1d2b64/devtools/client/shared/widgets/view-helpers.js#220

the test fails because the transition is cancelled in the following way:
  1. togglePane in test triggers togglePane in view-helpers.js, and transition starts (expanding)
  2. transition ends and transitionend event is dispatched
  3. transitionend event handler in the test is first called, and the promise gets resolved
  4. before executing the transitionend event handler in view-helpers.js, microtask check point happens and the remaining part of the test is executed
  5. the test triggers togglePane again, but the call aborts because animated attribute is still there

so, the test should wait for the next event tick to make sure the other event handlers get called, before continuing to the remaining part.
to debug the test, I converted the test to use async function,
I think landing the change as well won't harm.
Attachment #8942446 - Flags: review?(pbrosset)
as mentioned in comment #0, after bug 1193394, the test needs to wait for the next event tick to avoid executing the remaining part of the test after receiving transitionend event, before the other transitionend event handler (that is, devtools's one).
Attachment #8942447 - Flags: review?(pbrosset)
Comment on attachment 8942446 [details] [diff] [review]
Part 1: Use Async Function in devtools/client/debugger/test/mochitest/browser_dbg_instruments-pane-collapse_keyboard.js

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

Much easier to read. Thank you.
Attachment #8942446 - Flags: review?(pbrosset) → review+
Attachment #8942447 - Flags: review?(pbrosset) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/4b2c361673c66bb1038c32588c5971b40b5dbf3b
Bug 1430408 - Part 1: Use Async Function in devtools/client/debugger/test/mochitest/browser_dbg_instruments-pane-collapse_keyboard.js r=pbro

https://hg.mozilla.org/integration/mozilla-inbound/rev/5bf29bdee18b4a435b8f9fa9b99dcea6a9556b93
Bug 1430408 - Part 2: Wait for the next event tick after transitionend event to make sure the all event handlers finish in devtools/client/debugger/test/mochitest/browser_dbg_instruments-pane-collapse_keyboard.js r=pbro
https://hg.mozilla.org/mozilla-central/rev/4b2c361673c6
https://hg.mozilla.org/mozilla-central/rev/5bf29bdee18b
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: