Make a UrlbarTestUtils.jsm helper for tests and move functions from head-common.js into it
Categories
(Firefox :: Address Bar, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
Details
(Whiteboard: [fxsearch])
Attachments
(3 files)
Following bug 1514164 we have browser/components/urlbar/tests/browser/head-common.js which contains a lot of common urlbar related functions for tests.
If we move them to a .jsm, we can share them across directories better (without having to include the head file). We can also hide some of the implementation in the test functions themselves to make testing simpler and clearer.
I think at the same time, we should make the functions work with both the current address bar and QuantumBar to make it easier to port tests.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D17258
Assignee | ||
Comment 3•5 years ago
|
||
For now, the existing functions remain in head-common.js and are wrappers around the UrlbarTestUtils to avoid churn whilst we work out the actual APIs we require.
Depends on D17259
Assignee | ||
Comment 4•5 years ago
|
||
After discussion with Marco today, we decided that I would only go as far as moving the functions into a .jsm. Marco is working on some abstractions to make it easier to work with both the current & QuantumBar.
Try push for the current patches: https://treeherder.mozilla.org/#/jobs?repo=try&revision=7b8a7728aa43abe6cff0ae6623e23e66d8541886
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/60725e26d685 Move waitForDocLoadAndStopIt to BrowserTestUtils. r=mak https://hg.mozilla.org/integration/autoland/rev/51025d682291 Move promisePopupEvent to BrowserTestUtils.jsm. r=mak https://hg.mozilla.org/integration/autoland/rev/248f94519729 Move most of urlbar's head-common.js functions to a UrlbarTestUtils.jsm module. r=mak
Comment 6•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/60725e26d685
https://hg.mozilla.org/mozilla-central/rev/51025d682291
https://hg.mozilla.org/mozilla-central/rev/248f94519729
Description
•