diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /comm/mail/components/extensions/test/browser/browser_ext_composeAction_popup_click_mv3_event_pages.js | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | comm/mail/components/extensions/test/browser/browser_ext_composeAction_popup_click_mv3_event_pages.js | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/comm/mail/components/extensions/test/browser/browser_ext_composeAction_popup_click_mv3_event_pages.js b/comm/mail/components/extensions/test/browser/browser_ext_composeAction_popup_click_mv3_event_pages.js new file mode 100644 index 0000000000..2a5cca1e12 --- /dev/null +++ b/comm/mail/components/extensions/test/browser/browser_ext_composeAction_popup_click_mv3_event_pages.js @@ -0,0 +1,52 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +let account; + +add_setup(async () => { + account = createAccount(); + addIdentity(account); +}); + +async function subtest_popup_open_with_click_MV3_event_pages( + terminateBackground +) { + for (let area of [null, "formattoolbar"]) { + let composeWindow = await openComposeWindow(account); + await focusWindow(composeWindow); + let testConfig = { + manifest_version: 3, + terminateBackground, + actionType: "compose_action", + testType: "open-with-mouse-click", + window: composeWindow, + default_area: area, + }; + + await run_popup_test({ + ...testConfig, + }); + await run_popup_test({ + ...testConfig, + disable_button: true, + }); + await run_popup_test({ + ...testConfig, + use_default_popup: true, + }); + + composeWindow.close(); + Services.xulStore.removeDocument( + "chrome://messenger/content/messengercompose/messengercompose.xhtml" + ); + } +} +// This MV3 test clicks on the action button to open the popup. +add_task(async function test_event_pages_without_background_termination() { + await subtest_popup_open_with_click_MV3_event_pages(false); +}); +// This MV3 test clicks on the action button to open the popup (background termination). +add_task(async function test_event_pages_with_background_termination() { + await subtest_popup_open_with_click_MV3_event_pages(true); +}); |