Closed Bug 1437712 Opened 6 years ago Closed 6 years ago

Fix timeout in devtools/client/debugger/test/mochitest/browser_dbg_break-on-next.js with the patch for bug 1193394

Categories

(DevTools :: Debugger, defect)

defect
Not set
normal

Tracking

(firefox60 fixed)

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: hiro, Assigned: hiro)

References

Details

Attachments

(1 file)

Blocks: 1193394
The timeout happened where we wait for oncePaused promise.
CCing bgrinstead who introduce this test case in bug 789430.

[1] https://hg.mozilla.org/mozilla-central/file/6d8f470b2579/devtools/client/debugger/test/mochitest/browser_dbg_break-on-next.js
(In reply to Hiroyuki Ikezoe (:hiro) from comment #1)
> The timeout happened where we wait for oncePaused promise.
> CCing bgrinstead who introduce this test case in bug 789430.
> 
> [1]
> https://hg.mozilla.org/mozilla-central/file/6d8f470b2579/devtools/client/
> debugger/test/mochitest/browser_dbg_break-on-next.js

Correct link is;

https://hg.mozilla.org/mozilla-central/file/6d8f470b2579/devtools/client/debugger/test/mochitest/browser_dbg_break-on-next.js#l78

interruptedByResumeButton [1] is false in the failure case for some reasons.

[1] https://hg.mozilla.org/mozilla-central/file/6d8f470b2579/devtools/client/debugger/debugger-controller.js#l586
From the test;

    let onceResumed = gTarget.once("thread-resumed");
    EventUtils.sendMouseEvent({ type: "mousedown" }, gResumeButton, gDebugger);   // (1)
    yield onceResumed;
  });

  let testEvent = Task.async(function* () {
    info("Starting testEvent");

    let oncePaused = gTarget.once("thread-paused");
    EventUtils.sendMouseEvent({ type: "mousedown" }, gResumeButton, gDebugger);
    once(gDebugger.gClient, "willInterrupt").then(() => {
      generateMouseClickInTab(gTab, "content.document.querySelector('button')");
    });
    yield oncePaused; // (2)

What's going on the failure case is;

1. In the previous test we do dispatch 'mousedown' event at (1)
2. _onResumePressed() in toolbar-view.js is called
3. this.activeThread.resume(this.resumptionWarnFunc) _onResumePressed() in is called, but 'resumed' event has not processed at this moment
4. the next test starts
5. the 'resumed' event is processed while we are waiting for 'thread-paused' Promise
6. _update() in debugger-controller.js is called
7. this.interruptedByResumeButton is set to false in _update() since the received event is 'resumed'

After 7, we don't have a chance to set interruptedByResumeButton to true.

I don't have any idea to solve this yet, but I think we should fix implementation instead of tweaking the test.
One thing I am really wondering is why this failure hasn't appeared in the past tries?
This is for the old debugger UI which we don't ship anymore. Jason, is there an analogous test for the new frontend which would allow us to just delete / skip this one instead of fixing it?
Flags: needinfo?(jlaster)
actually, i dont think we do, just created an issue https://github.com/devtools-html/debugger.html/issues/5446

the underlying logic is tested here https://searchfox.org/mozilla-central/source/devtools/server/tests/unit/test_interrupt.js so it is probably okay to skip and we'll add the new UI test soon.
Flags: needinfo?(jlaster)
Thank you both!  Let's skip it.
Assignee: nobody → hikezoe
Status: NEW → ASSIGNED
Comment on attachment 8951796 [details]
Bug 1437712 - Skip browser_dbg_break-on-next.js.

https://reviewboard.mozilla.org/r/221072/#review229744
Attachment #8951796 - Flags: review+
Pushed by hikezoe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c7cab5776a7d
Skip browser_dbg_break-on-next.js. r=bgrins
https://hg.mozilla.org/mozilla-central/rev/c7cab5776a7d
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Comment on attachment 8951796 [details]
Bug 1437712 - Skip browser_dbg_break-on-next.js.

https://reviewboard.mozilla.org/r/221072/#review230228
Attachment #8951796 - Flags: review?(jlaster) → review+
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: