Closed Bug 1578465 Opened 5 years ago Closed 5 years ago

Make BrowserTestUtils.browserLoaded Fission-compatible

Categories

(Core :: DOM: Content Processes, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla72
Fission Milestone M4
Tracking Status
firefox72 --- fixed

People

(Reporter: u608768, Assigned: u608768)

References

(Blocks 1 open bug)

Details

Attachments

(4 files, 4 obsolete files)

A lot of failing Fission mochitests rely on browserLoaded and other BrowserTestUtils helpers. Rewriting browserLoaded to use RemoteWebProgress or JSWindowActors should fix a number of these tests.

Depends on: 1579282
Depends on: 1580752
Depends on: 1581925
Blocks: fission-mochitests
No longer blocks: 1541173
Fission Milestone: --- → M4
Blocks: 1584931
Component: Mochitest → DOM: Content Processes
Product: Testing → Core
Version: Version 3 → unspecified

Depends on D49001

Adds BrowserTestUtilsChild.jsm to the list of modules that we load for new
content processes. We now listen for "load" and "DOMContentLoaded" events, so
this module gets instantiated earlier.

Depends on D49002

Depends on D49003

Depends on D49004

Attachment #9100528 - Attachment description: Bug 1578465 - Change firstBrowserLoaded() to use "Test:load", r=kmag → Bug 1578465 - Remove the content-utils.js framescript, r=kmag
Depends on: 1589399
No longer depends on: 1580752
Blocks: 1587386
Attachment #9101668 - Attachment is obsolete: true
Attachment #9100527 - Attachment description: Bug 1578465 - Make BrowserTestUtils.browserLoaded() Fission-compatiable, r=kmag → Bug 1578465 - Make BrowserTestUtils.browserLoaded() Fission-compatiable, r=nika
Attachment #9100528 - Attachment description: Bug 1578465 - Remove the content-utils.js framescript, r=kmag → Bug 1578465 - Remove the content-utils.js framescript, r=nika
Attachment #9100529 - Attachment description: Bug 1578465 - Fix browser_startup_content.js, r=kmag → Bug 1578465 - Update browser_startup_content.js, r=kmag
Attached file Bug 1578465 - Update browser_windowopen.js, r=mconley (obsolete) (deleted) —

Since BrowserTestUtils.firstBrowserLoaded now resolves slightly later than it
did before, the STATE_STOP notification is dispatched before we get a chance
to add the progress listener in BrowserTestUtils.browserStopped. We should
create both Promises before waiting for the initial load to finish.

Depends on D49003

Attachment #9100530 - Attachment description: Bug 1578465 - Fix some usages of browserLoaded, r=kmag → Bug 1578465 - Fix some incorrect usages of browserLoaded, r=kmag
No longer blocks: 1587386
Blocks: 1586725
Pushed by kmadan@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4420f02e5c3a Make BrowserTestUtils.browserLoaded() Fission-compatiable, r=nika https://hg.mozilla.org/integration/autoland/rev/ca658e02223d Remove the content-utils.js framescript, r=nika https://hg.mozilla.org/integration/autoland/rev/a3857bf2b069 Update browser_startup_content.js, r=kmag,mconley https://hg.mozilla.org/integration/autoland/rev/38a4c02bc815 Update browser_windowopen.js, r=mconley https://hg.mozilla.org/integration/autoland/rev/bd41e1217534 Fix some incorrect usages of browserLoaded, r=kmag https://hg.mozilla.org/integration/autoland/rev/46073b8c1da9 Update fission annotations, r=kmag
Regressions: 1590774
Backout by rgurzau@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/de3af64d1347 Backed out 6 changesets for mochitest leakcheck failures on a CLOSED TREE.

Backed out 6 changesets (bug 1578465) for mochitest leakcheck failures on a CLOSED TREE.

Backout link: https://hg.mozilla.org/integration/autoland/rev/de3af64d13472d9ab391f0454a84c3e7d4f37167

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&searchStr=browser-chrome&revision=46073b8c1da99a2402e8f2ffc8ce81597f4a64db&selectedJob=272857066

Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=272857066&repo=autoland&lineNumber=15204

Log snippet:
[task 2019-10-24T22:31:36.696Z] 22:31:36 INFO - TEST-INFO | leakcheck | default leaked 2 nsXULPrototypeDocument
[task 2019-10-24T22:31:36.696Z] 22:31:36 INFO - TEST-INFO | leakcheck | default leaked 1984 nsXULPrototypeNode
[task 2019-10-24T22:31:36.696Z] 22:31:36 INFO - TEST-INFO | leakcheck | default leaked 1 nsXULTooltipListener
[task 2019-10-24T22:31:36.697Z] 22:31:36 INFO - TEST-INFO | leakcheck | default leaked 1 nsZipArchive
[task 2019-10-24T22:31:36.697Z] 22:31:36 INFO - TEST-INFO | leakcheck | default leaked 1 nsZipReaderCache
[task 2019-10-24T22:31:36.697Z] 22:31:36 INFO - TEST-INFO | leakcheck | default leaked 5 xpc::CompartmentPrivate
[task 2019-10-24T22:31:36.697Z] 22:31:36 INFO - TEST-INFO | leakcheck | default leaked 1 xpcJSWeakReference
[task 2019-10-24T22:31:36.697Z] 22:31:36 INFO - TEST-UNEXPECTED-FAIL | leakcheck | default 61210547 bytes leaked (AbstractThread, AbstractWatcher, AnimationTimeline, AsyncFreeSnowWhite, AtomSet, ...)
[task 2019-10-24T22:31:36.698Z] 22:31:36 INFO -
[task 2019-10-24T22:31:36.698Z] 22:31:36 INFO - leakcheck | Processing leak log file /var/folders/1x/th9cbfts1zzbgt7m41mdbmd8000017/T/tmpRWanJ7.mozrunner/runtests_leaks_tab_pid1691.log
[task 2019-10-24T22:31:36.698Z] 22:31:36 INFO -
[task 2019-10-24T22:31:36.702Z] 22:31:36 INFO - == BloatView: ALL (cumulative) LEAK AND BLOAT STATISTICS, tab process 1691
[task 2019-10-24T22:31:36.702Z] 22:31:36 INFO -
[task 2019-10-24T22:31:36.702Z] 22:31:36 INFO - |<----------------Class--------------->|<-----Bytes------>|<----Objects---->|
[task 2019-10-24T22:31:36.702Z] 22:31:36 INFO - | | Per-Inst Leaked| Total Rem|
[task 2019-10-24T22:31:36.702Z] 22:31:36 INFO - 0 |TOTAL | 35 0| 1286056 0|
[task 2019-10-24T22:31:36.702Z] 22:31:36 INFO -
[task 2019-10-24T22:31:36.703Z] 22:31:36 INFO - nsTraceRefcnt::DumpStatistics: 1128 entries
[task 2019-10-24T22:31:36.703Z] 22:31:36 INFO - TEST-PASS | leakcheck | tab no leaks detected!
[task 2019-10-24T22:31:36.703Z] 22:31:36 INFO - leakcheck | Processing leak log file /var/folders/1x/th9cbfts1zzbgt7m41mdbmd8000017/T/tmpRWanJ7.mozrunner/runtests_leaks_tab_pid1685.log
[task 2019-10-24T22:31:36.703Z] 22:31:36 INFO -
[task 2019-10-24T22:31:36.703Z] 22:31:36 INFO - == BloatView: ALL (cumulative) LEAK AND BLOAT STATISTICS, tab process 1685

Flags: needinfo?(kmadan)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla72 → ---
Depends on: 1590774
Attachment #9100529 - Attachment description: Bug 1578465 - Update browser_startup_content.js, r=kmag → Bug 1578465 - Fix broken tests, r=kmag,mconley
Attachment #9100530 - Attachment is obsolete: true
Attachment #9103154 - Attachment is obsolete: true
Pushed by kmadan@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c467ca392512 Make BrowserTestUtils.browserLoaded() Fission-compatiable, r=nika https://hg.mozilla.org/integration/autoland/rev/edf7398d610e Remove the content-utils.js framescript, r=nika https://hg.mozilla.org/integration/autoland/rev/39416fcbab25 Fix broken tests, r=kmag,mconley https://hg.mozilla.org/integration/autoland/rev/4a166c30c90d Update fission annotations, r=kmag
Flags: needinfo?(kmadan)
Regressions: 1591696
Attachment #9105550 - Attachment is obsolete: true

Ignore this attachment, I used a wrong bug number for my patch.

No longer depends on: 1579282
Depends on: 1599278

Any chance someone could update the browserLoaded code comments from this change?

(In reply to Dave Townsend [:mossop] (he/him) from comment #17)

Any chance someone could update the browserLoaded code comments from this change?

Filed bug 1601685.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: