convert relevant parts of messageInjection.js to MessageInjection.jsm
Categories
(Thunderbird :: Testing Infrastructure, task)
Tracking
(thunderbird_esr91 wontfix)
Tracking | Status | |
---|---|---|
thunderbird_esr91 | --- | wontfix |
People
(Reporter: mkmelin, Assigned: u695164)
References
Details
Attachments
(10 files, 2 obsolete files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
This should be hg copied over to a new file and converted over to a .jsm, for relevant parts.
Reporter | ||
Comment 1•3 years ago
|
||
To expand on the above. Convert it to a .jsm which exposes needed function. I think the functions that get called by including the file should be called explicitly in the caller.
Reporter | ||
Updated•3 years ago
|
Changed also importing in comm/mail/test/browser over comm/mail/test/browser/shared-modules/FolderDisplayHelpers.jsm.
MessageInjection is completely fowarded not subfunctions of it.
delete_message_set is renamed to MessageInjection.async_delete_messages
Updated•3 years ago
|
Im still unsure if i should get rid of asyncTestUtils.js
through async/await/Promise stuff or using Internals to load a JS file like
load_via_src_path in a jsm file.
I'd prefer getting rid of asyncTestUtils in MessageInjection.jsm through async/await/Promise. Is it a long term goal to get rid of asyncTestUtils.js
or do i oversee here something?
found Bug 1571683 - [meta] get rid of asyncTestUtils.js, so I'm going ahead for the async/await/Promise.
Thanks for your advice to get in c-c.
I do have test failure after rebasing the patch on the latest c-c.
https://searchfox.org/comm-central/rev/24389a8c5ecf3e4b3bf30af9c51a6c09a936ca63/mailnews/imap/test/unit/test_offlineStoreLocking.js#99
FAIL compactOneFolder - [compactOneFolder : 99] false == 128
I'm still trying to figure out if its caused by this patch.
The compactOneFolder
is not caused by this patch, it seems safe to apply.
There are about 100 tests who are using generators for async execution.
Before introducing MessageInjection.jsm I'd like to mark messageInjection.js as deprecated.
This should make it easier to replace the future implementation of MessageInjection.jsm to get
rid of generators for async execution in all tests. Some tests might have more reasons than
messageInjection for using asyncTestUtils. In this case the deprecated marking could give a hint
that there is a async/await/Promise MessageInjection.
Using mozilla-central/toolkit/modules/Deprecated.jsm:warning
causes the tests to fail.
Thats why I'm using the file name and object name to indicate that something is about to happen.
Updated•3 years ago
|
Comment 10•3 years ago
|
||
Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/8055f233b878
Part 1: Using object MessageInjection for messageInjection.js functions. r=mkmelin
Comment 11•3 years ago
|
||
Backout (part 1). ESLint error will likely cascade to other broken tests.
https://hg.mozilla.org/comm-central/rev/bf53384895f3585e5b7b7b89fd0012f687797b93
Assignee | ||
Comment 12•3 years ago
|
||
Arghhh, thanks!
Assignee | ||
Comment 13•3 years ago
|
||
Part 1 new Try run on latest c-c:
https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=056b5c4eab0a0e0f91332d2a60944c2b44dd9551
Comment 14•3 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/101751fa59a9
Part 1: Using object MessageInjection for messageInjection.js functions. r=mkmelin
Assignee | ||
Comment 15•3 years ago
|
||
SyntheticMessageSet is used in messageInjection. To convert messageInjection to a JSM this
dependency is converted to a JSM aswell.
With this change SyntheticMessageSet is invoked over the exported symbol MessageModifier as
MessageModifier.SyntheticMessageSet(...).
Depends on D132686
Assignee | ||
Comment 16•3 years ago
|
||
Depends on D132915
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 17•3 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/9c12b7973aa3
Part 2: Copy contents of messageModifier.js into MessageGenerator.jsm. r=mkmelin
Assignee | ||
Comment 18•3 years ago
|
||
Depends on D132916
Updated•3 years ago
|
Assignee | ||
Comment 19•3 years ago
|
||
With Part 4 there should be 59 cases left with messageInjection.js usage.
mail/base/test/unit/test_emptyTrash_dbViewWrapper.js
mail/base/test/unit/test_viewWrapper_imapFolder.js
mail/base/test/unit/test_viewWrapper_logic.js
mail/base/test/unit/test_viewWrapper_realFolder.js
mail/base/test/unit/test_viewWrapper_virtualFolder.js
mail/base/test/unit/test_viewWrapper_virtualFolderCustomTerm.js
mail/base/test/unit/resources/viewWrapperTestUtils.js
mailnews/base/test/unit/test_junkingWhenDisabled.js
mailnews/base/test/unit/test_nsIFolderListener.js
mailnews/base/test/unit/test_nsMsgDBView_headerValues.js
mailnews/base/test/unit/test_nsMsgDBView.js
mailnews/base/test/unit/test_retention.js
mailnews/base/test/unit/test_viewSortByAddresses.js
mailnews/db/gloda/test/unit/base_gloda_content.js
mailnews/db/gloda/test/unit/base_index_junk.js
mailnews/db/gloda/test/unit/base_index_messages.js
mailnews/db/gloda/test/unit/base_query_messages.js
mailnews/db/gloda/test/unit/test_cleanup_msf_databases.js
mailnews/db/gloda/test/unit/test_folder_logic.js
mailnews/db/gloda/test/unit/test_fts3_tokenizer.js
mailnews/db/gloda/test/unit/test_gloda_content_imap_offline.js
mailnews/db/gloda/test/unit/test_gloda_content_local.js
mailnews/db/gloda/test/unit/test_index_addressbook.js
mailnews/db/gloda/test/unit/test_index_bad_messages.js
mailnews/db/gloda/test/unit/test_index_compaction.js
mailnews/db/gloda/test/unit/test_index_junk_imap_offline.js
mailnews/db/gloda/test/unit/test_index_junk_imap_online.js
mailnews/db/gloda/test/unit/test_index_junk_local.js
mailnews/db/gloda/test/unit/test_index_messages_imap_offline.js
mailnews/db/gloda/test/unit/test_index_messages_imap_online_to_offline.js
mailnews/db/gloda/test/unit/test_index_messages_imap_online.js
mailnews/db/gloda/test/unit/test_index_messages_local.js
mailnews/db/gloda/test/unit/test_index_sweep_folder.js
mailnews/db/gloda/test/unit/test_intl.js
mailnews/db/gloda/test/unit/test_migration.js
mailnews/db/gloda/test/unit/test_mime_attachments_size.js
mailnews/db/gloda/test/unit/test_mime_emitter.js
mailnews/db/gloda/test/unit/test_msg_search.js
mailnews/db/gloda/test/unit/test_query_messages_imap_offline.js
mailnews/db/gloda/test/unit/test_query_messages_imap_online_to_offline.js
mailnews/db/gloda/test/unit/test_query_messages_imap_online.js
mailnews/db/gloda/test/unit/test_query_messages_local.js
mailnews/db/gloda/test/unit/test_smime_mimemsg_representation.js
mailnews/db/gloda/test/unit/test_startup_offline.js
mailnews/db/gloda/test/unit/resources/glodaTestHelper.js
mailnews/imap/test/unit/test_imapAutoSync.js
mailnews/imap/test/unit/test_imapHdrStreaming.js
mailnews/imap/test/unit/test_imapStoreMsgOffline.js
mailnews/local/test/unit/test_undoDelete.js
mailnews/mime/test/unit/test_alternate_p7m_handling.js
mailnews/mime/test/unit/test_attachment_size.js
mailnews/mime/test/unit/test_badContentType.js
mailnews/mime/test/unit/test_hidden_attachments.js
mailnews/mime/test/unit/test_message_attachment.js
mailnews/mime/test/unit/test_openpgp_decrypt.js
mailnews/mime/test/unit/test_rfc822_body.js
mailnews/mime/test/unit/test_smime_decrypt.js
mailnews/mime/test/unit/test_smime_perm_decrypt.js
mailnews/mime/test/unit/test_text_attachment.js
mailnews/db/gloda/test/unit/**
will be shifted to MessageInjection.jsm as last one. It might be stuff for another bug filing.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 20•3 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/7782a9bd2022
Part 3: Introduce MessageInjection.jsm without using asyncTestUtils. r=mkmelin
https://hg.mozilla.org/comm-central/rev/b7c7e8c081aa
Part 4: Getting rid of asyncTestUtils.js
in FolderDisplayHelpers.jsm by using MessageInjection.jsm. r=mkmelin
Assignee | ||
Comment 21•3 years ago
|
||
Comment 22•3 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/3480eae44be8
Part 5: Using MessageInjection.jsm in mailnews/base/test/unit/**. r=mkmelin
Assignee | ||
Comment 23•3 years ago
|
||
Comment 24•3 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/8ad01f03ecec
Part 6: Using MessageInjection.jsm in comm/mailnews/local/test/unit/test_undoDelete.js. r=mkmelin
Assignee | ||
Comment 25•3 years ago
|
||
Comment 26•3 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/73a117e64bda
Part 7: Using MessageInjection.jsm in mailnews/mime/test/unit/**. r=mkmelin
Comment 27•3 years ago
|
||
Assignee | ||
Comment 28•3 years ago
|
||
Assignee | ||
Comment 29•3 years ago
|
||
Depends on D139385
Comment 30•3 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/60248cc0235b
Part 8: MessageInjection.jsm different approach to explain the usage of MessageGenerator and delete makeFolderWithSets. r=mkmelin
https://hg.mozilla.org/comm-central/rev/eb657663cbe5
Part 9: Using MessageInjection.jsm in mail/base/test/unit/**. r=mkmelin
Assignee | ||
Comment 32•3 years ago
|
||
Depends on D141383
Comment 33•3 years ago
|
||
Reporter | ||
Updated•3 years ago
|
Description
•