Improve testing the browser toolbox
Categories
(DevTools :: Framework, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: ochameau, Assigned: bhackett1024)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
Attachments
(3 files, 1 obsolete file)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
Updated•7 years ago
|
Updated•6 years ago
|
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
This patch is going in the direction of using the debugger protocol to implement something like ContentTask. This allows the test to trigger activity in the browser toolbox and then block (via await) until that activity completes. Something like this is necessary for tests which need to ensure that things happen in a well defined order.
The interfaces here are very much a WIP, but this adds a new global front living under the root front (named "toolbox" and in dire need of a rename) with methods that allows the server (where the test lives) to perform evaluations in the client (where the browser toolbox lives), provided that the testing only devtools.browser-toolbox.allow-unsafe-script preference is set. This is far enough along that the server can trigger an eval in the client and get the result.
Assignee | ||
Comment 2•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
|
||
This patch adds a browserToolboxTest actor which the server can use to perform evaluations in a sandbox in the client. It is only usable in tests that use the browser toolbox. This patch also adds a couple tests which use this, for making sure that the console shows messages from newly opened tabs and that the debugger updates its content process list when tabs are opened or closed. These tests both depend on bug 1586359.
Assignee | ||
Comment 4•5 years ago
|
||
Also, we still can't import test scripts here. URLs for testing files only seem to load in the original firefox instance. The tests here get around this by stringifying the testing functions they need and including them in the evaluated scripts, but this strategy will only work with simple functions.
Assignee | ||
Comment 5•5 years ago
|
||
Assignee | ||
Comment 6•5 years ago
|
||
Depends on D48864
Updated•5 years ago
|
Assignee | ||
Comment 8•5 years ago
|
||
Part 3 should be able to land later today. I'm not sure yet if I'll be able to land the test in part 2 --- it hasn't been very easy to control which processes the browser spawns when running longer test suites.
Updated•5 years ago
|
Comment 10•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Description
•