Closed Bug 1797390 Opened 3 years ago Closed 3 years ago

Test bustage for BrowserTestUtils.promiseAlertDialog()

Categories

(Thunderbird :: Testing Infrastructure, defect)

defect

Tracking

(thunderbird_esr102 unaffected, thunderbird107 affected)

RESOLVED FIXED
108 Branch
Tracking Status
thunderbird_esr102 --- unaffected
thunderbird107 --- affected

People

(Reporter: aleca, Assigned: mkmelin)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [fixed by bug 1752288])

Attachments

(1 obsolete file)

Thunderbird tests using BrowserTestUtils.promiseAlertDialog() are failing with:
can't access property "accept", this._buttons is undefined - stack: getButton@chrome://global/content/elements/dialog.js

Making this method sync again fixes the tests.

I'm not sure why and how is this happening.

This seems to be related to bug 1708090, but bug 1796408 made the existing issue bubble up.

Flags: needinfo?(emilio)

It seems that the tests that are failing are those using a dialog that was converted to a top level HTML from bug 1703164, while all other tests interacting with a <window> dialog seem to not have any problem with BrowserTestUtils.promiseAlertDialog().
I checked only a bunch of calendar related tests, so I might be wrong, but this seems to be the pattern, also no failures on m-c as it looks like they only have <window> dialogs and not top level HTML dialogs.

Flags: needinfo?(mkmelin+mozilla)

I suspect this is related to bug 1752288.
I didn't have time to go to the bottom of it, but when converting to top level html (bug 1703164) the buttons not being defined (yet) problem has popped up some times. We've worked around it by adding the scripts after the <xul:dialog> - https://searchfox.org/comm-central/search?q=bug%201752288
AFAIR, it's likely a bug in the xul dialog.js that triggers due to slightly different timings/load sequence for top level html vs top level xul.

Assignee: nobody → alessandro
Status: NEW → ASSIGNED

So... if I understand the log, the only way this._buttons can be undefined is if the connectedCallback for the dialog hasn't run by the time the load event has fired... Which doesn't make a whole lot of sense?

Flags: needinfo?(emilio)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)

So... if I understand the log, the only way this._buttons can be undefined is if the connectedCallback for the dialog hasn't run by the time the load event has fired... Which doesn't make a whole lot of sense?

See bug 1752288. That's what happens atm.

Note to self: The failures without the patch seem to be:
comm/calendar/test/browser/recurrence/browser_daily.js
comm/mail/test/browser/composition/browser_attachmentCloudDraft.js
comm/mail/test/browser/folder-display/browser_messageCommandsOnMsgstore.js
comm/mail/test/browser/folder-pane/browser_folderPaneConsumers.js
comm/calendar/test/browser/recurrence/browser_annual.js
comm/calendar/test/browser/eventDialog/browser_eventDialog.js #unrelated?
comm/calendar/test/browser/providers/browser_caldavCalendar_cached.js
comm/mail/test/browser/composition/browser_attachmentReminder.js
comm/calendar/test/browser/recurrence/browser_customMinimonthCount.js # unrelated? fails locally with m-c patch

Depends on: 1752288
Flags: needinfo?(mkmelin+mozilla)
Attachment #9300257 - Attachment is obsolete: true
Assignee: alessandro → nobody
Status: ASSIGNED → NEW

Bug 1752288 took care of this.

Assignee: nobody → mkmelin+mozilla
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Whiteboard: [fixed by bug 1752288]
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: