Closed Bug 1276873 Opened 5 years ago Closed 5 years ago

Intermittent browser_toolbox_window_title_frame_select.js | Test timed out -

Categories

(DevTools :: Framework, defect, P1)

defect

Tracking

(firefox49 fixed)

RESOLVED FIXED
Firefox 49
Iteration:
49.3 - Jun 6
Tracking Status
firefox49 --- fixed

People

(Reporter: cbook, Assigned: Honza)

References

()

Details

(Keywords: intermittent-failure, Whiteboard: [btpp-fix-later] [devtools-html])

Attachments

(1 file)

https://treeherder.mozilla.org/logviewer.html#?job_id=9652635&repo=fx-team#L0-L3694

 08:21:09 INFO - 124 INFO TEST-UNEXPECTED-FAIL | devtools/client/framework/test/browser_toolbox_window_title_frame_select.js | Test timed out -
Getting more info from try:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=074b7921b4f4

Honza
Assignee: nobody → odvarko
Status: NEW → ASSIGNED
Iteration: --- → 49.3 - Jun 6
Flags: qe-verify-
Whiteboard: [btpp-fix-later] [devtools-html]
Don't you just need to do:
  let onOpen = once(menu, "open");
  let menu = toolbox.showFramesMenu({target: btn});
  yield onOpen;
instead of:
  let menu = toolbox.showFramesMenu({target: btn});
  yield once(menu, "open");

?
(In reply to Alexandre Poirot [:ochameau] from comment #7)
> Don't you just need to do:
>   let onOpen = once(menu, "open");
>   let menu = toolbox.showFramesMenu({target: btn});
>   yield onOpen;
> instead of:
>   let menu = toolbox.showFramesMenu({target: btn});
>   yield once(menu, "open");
> 
> ?
I tried to listen for the 'open' event immediately after the Menu is instantiated in showFramesMenu, but the event is never fired - instead I am getting 'popuphidden' (note that the issue happens only in the second test run).

I am not sure what really causes it, but using waitForTick() before trying to open the menu avoids the 'popuphidden' event and the menu opens just fine (like there was something happening on the current stack, e.g. a focus event?).

Honza
Comment on attachment 8759146 [details] [diff] [review]
bug1276873.patch

Ryan, here is a patch that fixes the test failure (waitForTick). It also fixes the ways how 'items' in Menu object are accessed (using getter).

Honza
Attachment #8759146 - Flags: review?(jryans)
Comment on attachment 8759146 [details] [diff] [review]
bug1276873.patch

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

::: devtools/client/framework/test/browser_toolbox_window_title_frame_select.js
@@ +31,5 @@
>      "Devtools title correct after switching to detached window host");
>  
> +  // Wait for tick to avoid unexpected 'popuphidden' event, which
> +  // blocks the frame popup menu opened below. See also bug 1276873
> +  yield waitForTick();

It's possible this is fragile on slow machines, but if it works for try it works for me.
Attachment #8759146 - Flags: review?(jryans) → review+
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #11)
> It's possible this is fragile on slow machines, but if it works for try it
> works for me.
Try is green, but I'll be watching it. This has been failing quite often
and we should see results soon.

Thanks for the review.
Honza
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/fx-team/rev/f4fbac42bc5e
Wait for a tick to avoid unexpected popuphidden event; r=jryans
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/f4fbac42bc5e
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.