Closed
Bug 929535
Opened 11 years ago
Closed 8 years ago
Attach browser debugger to tests before they start running
Categories
(DevTools :: Debugger, defect, P3)
DevTools
Debugger
Tracking
(firefox55 fixed)
RESOLVED
FIXED
Firefox 55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: Gijs, Assigned: jryans)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Per IRC discussion about bug 895471, ensuring that tests don't run until the browser debugger is fully connected isn't trivial. The current mochitest patch on that bug uses --no-autorun as a clumsy way to ensure this is the case. We should try to come up with something more solid that the test framework can hook into to determine the debugger is ready before proceeding with running tests (automatically, ie without hitting the button).
Comment 1•11 years ago
|
||
My idea was to make the debugger server dispatch a Debugger:Resumed DOM event every time ThreadActor.prototype.onResume is called, which would indicate that the browser debugger is attached and ready to debug the test process. Similar to how the Debugger:Shutdown event is currently dispatched from the server on shutdown.
My only worry is if the test harness code that waits for that event is paused until the debugger resumes, in which case we would have to do something more hacky (like maybe setting an expando flag on the chrome window and polling).
Updated•11 years ago
|
Priority: -- → P3
Updated•10 years ago
|
Blocks: dbg-browser
Updated•10 years ago
|
Summary: Flesh out event/interaction between the browser debugger and mochitest(-*) so as to avoid --no-autorun but have debuggable tests → Attach browser debugger to tests before they start running
Comment hidden (mozreview-request) |
Assignee | ||
Comment 3•8 years ago
|
||
It's not obvious to me whether the current patch is really that much better, since you still have to click something (at least on macOS) because of focus issues. We'll see what Gijs thinks though. :)
Reporter | ||
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8846688 [details]
Bug 929535 - Use wait-for-jsdebugger with mochitests.
https://reviewboard.mozilla.org/r/119702/#review121542
::: testing/mochitest/runtests.py:2422
(Diff revision 1)
> if options.immersiveMode:
> options.browserArgs.extend(('-firefoxpath', options.app))
> options.app = self.immersiveHelperPath
>
> if options.jsdebugger:
> - options.browserArgs.extend(['-jsdebugger'])
> + options.browserArgs.extend(['--jsdebugger', '--wait-for-jsdebugger'])
Is using two dashes here right? I seem to recall that for some reason only 1 of these works on Windows, or something. Worth checking.
Attachment #8846688 -
Flags: review?(gijskruitbosch+bugs) → review+
Assignee | ||
Comment 5•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8846688 [details]
Bug 929535 - Use wait-for-jsdebugger with mochitests.
https://reviewboard.mozilla.org/r/119702/#review121542
> Is using two dashes here right? I seem to recall that for some reason only 1 of these works on Windows, or something. Worth checking.
Sigh, it seems you are right. Switched back to single dashes. (Windows also doesn't print any CLI help either...)
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → jryans
Status: NEW → ASSIGNED
Pushed by jryans@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/b62199ddf0f3
Use wait-for-jsdebugger with mochitests. r=Gijs
Comment 8•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•