Closed Bug 1828110 Opened 2 years ago Closed 11 months ago

Make tabs.create() compatible with Firefox

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED
124 Branch

People

(Reporter: tdulcet, Assigned: TbSync)

References

Details

(Whiteboard: [snnot3p])

Attachments

(4 files, 3 obsolete files)

This bug was created at the request of John in bug 1716200:

(In reply to John Bieling (:TbSync) from comment #17)

Currently in the latest TB Daily, tabs.create() with an arbitrary URI just opens a blank tab and does not prompt the user to open their external application.

Hm. I think that does not work, because it triggers the overlay prompter and not the dialog prompter. That needs a new bug.

Bug 1716200 should fix the tabs.update() function to be compatible with Firefox and support opening arbitrary URIs, but the tabs.create() function still does not work as expected. With an arbitrary URI, it just opens a blank tab and does not prompt the user to open their external application.

For some context, with my Link Creator add-on, users can select text to open unlinked URIs, URLs, email addresses, telephone numbers, etc. After bug 1716200 lands, it will be able to use tabs.update() when opening a single arbitrary URI, but it still needs tabs.create() so it can open multiple arbitrary URIs. Bug 1828102 will also be needed to open mailto: URIs.

Flags: needinfo?(john)
Depends on: 1716200, 1828102

Marking as [snnot] per John's information. 20230419_1545

Whiteboard: [snnot]
Whiteboard: [snnot] → [snnot3p]

I filed Bug 1875460 with toolkit.

Flags: needinfo?(john)
See Also: → 1875460
Assignee: nobody → john
Status: NEW → ASSIGNED
Depends on: 1875460

We already have a test which verifies the correct urls being handled,
that however is using a mock of nsIExternalProtocolService. This test
verifies that the application chooser dialog is actually opened.

Depends on D199219

Depends on: 1879004
Attachment #9378543 - Attachment is obsolete: true
Attachment #9378714 - Attachment is obsolete: true
Attachment #9378713 - Attachment is obsolete: true

This adds a missing test for opening registered WebExtension protocol
handler pages in a popup window.

Depends on D199219

This adds missing tests for opening non-registered WebExtension protocol
handler pages and other pages which have to be handled externally in a popup window.

This also renames the changed test file to indicate, that these tests
use a mocked nsIExternalProtocolHandler.

Depends on D200922

We already have a test which verifies the correct urls being handled,
that however is using a mock of nsIExternalProtocolService. This test
verifies that the application chooser dialog is actually opened.

Depends on D200923

Summary: This reported bug is fixed by Bug 1875460. I use this bug to add tests to ensure the correct behavior.

Target Milestone: --- → 124 Branch

Pushed by john@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/0b7f8516204f
Add test for creating tabs with externally handled urls. r=#thunderbird-reviewers
https://hg.mozilla.org/comm-central/rev/ae33e7907af0
Add test for opening popup windows with WebExtension protocol handler urls. r=#thunderbird-reviewers
https://hg.mozilla.org/comm-central/rev/5b1c1d61123f
Add tests for opening popup windows with externally handled urls. r=#thunderbird-reviewers
https://hg.mozilla.org/comm-central/rev/562a1b98cfb6
Add test to verify the application chooser dialog is correctly opened. r=#thunderbird-reviewers

Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: