Closed Bug 1398383 Opened 2 years ago Closed 1 month ago

Drag and Drop Mozmill failure 2017-09-08: 7 failures (Friday bustage)


(Thunderbird :: General, defect)

Not set


(Not tracked)



(Reporter: jorgk-bmo, Unassigned)


(Keywords: leave-open)


(4 files)

TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-header-toolbar.js | test-header-toolbar.js::test_customize_header_toolbar_reorder_buttons
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-header-toolbar.js | test-header-toolbar.js::test_customize_header_toolbar_separate_window
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-header-toolbar.js | test-header-toolbar.js::test_customize_header_toolbar_remove_buttons
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-message-header.js | test-message-header.js::test_add_tag_with_really_long_label
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-message-header.js | test-message-header.js::test_a11y_attrs
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-message-header.js | test-message-header.js::test_more_button_with_many_recipients
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-message-header.js | test-message-header.js::test_clicking_star_opens_inline_contact_editor
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-message-header.js | test-message-header.js::test_msg_id_context_menu
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-message-header.js | test-message-header.js::test_address_book_switch_disabled_on_contact_in_mailing_list
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-message-header.js | test-message-header.js::test_that_msg_without_date_clears_previous_headers
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-message-header.js | test-message-header.js::test_more_widget
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-message-header.js | test-message-header.js::test_show_all_header_mode
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-message-header.js | test-message-header.js::test_more_widget_with_maxlines_of_3
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-message-header.js | test-message-header.js::test_more_widget_with_disabled_more
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-phishing-bar.js | test-phishing-bar.js::test_ignore_phishing_warning_from_message
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-phishing-bar.js | test-phishing-bar.js::test_no_phishing_warning_for_ip_sameish_text
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-phishing-bar.js | test-phishing-bar.js::test_no_phishing_warning_for_subdomain
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-phishing-bar.js | test-phishing-bar.js::test_phishing_warning_for_local_domain
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-reply-identity.js | test-reply-identity.js::test_reply_no_matching_identity
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-reply-identity.js | test-reply-identity.js::test_reply_matching_only_deliveredto
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-reply-identity.js | test-reply-identity.js::test_reply_matching_subaddress
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-reply-identity.js | test-reply-identity.js::test_reply_to_matching_second_id
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-reply-identity.js | test-reply-identity.js::test_deliveredto_to_matching_only_parlty
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-reply-identity.js | test-reply-identity.js::test_reply_to_self_second_id
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-reply-to-list-from-address-selection.js | test-reply-to-list-from-address-selection.js::test_Reply_To_List_From_Address
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-return-receipt.js | test-return-receipt.js::test_no_mdn_for_normal_msgs
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-return-receipt.js | test-return-receipt.js::test_basic_mdn_shown
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-return-receipt.js | test-return-receipt.js::test_basic_mdn_shown_nonrfc
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-return-receipt.js | test-return-receipt.js::test_mdn_when_from_and_disposition_to_differs
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-return-receipt.js | test-return-receipt.js::test_mdn_when_from_and_disposition_to_differs_nonrfc
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-return-receipt.js | test-return-receipt.js::test_mdn_when_disposition_to_multi
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\message-header\test-return-receipt.js | test-return-receipt.js::test_mdn_when_disposition_to_multi_nonrfc
TEST-UNEXPECTED-FAIL | ( | Exited with code 1 during directory run
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\tabmail\test-tabmail-customize.js | test-tabmail-customize.js::test_redirects_toolbarbutton_drops
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\tabmail\test-tabmail-dragndrop.js | test-tabmail-dragndrop.js::test_tab_reorder_tabbar
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\tabmail\test-tabmail-dragndrop.js | test-tabmail-dragndrop.js::test_tab_reorder_window
TEST-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\tabmail\test-tabmail-dragndrop.js | test-tabmail-dragndrop.js::test_tab_reorder_detach

First seen: Fri Sep 8, 2017, 22:32:43
Note: In this push Mac is still on good changeset, Windows already on bad:
M-C last good: dd3736e98e4e7558af2f202803bce36278
M-C first bad: ea7b55d65d76214f97aaae502d65cb26fc

Very short range (thanks to pro-active C-C sheriff) of 46 changesets. Looks like bug 1199729.

Aceman, care to take a look. I'd need to build first.
Flags: needinfo?(acelists)
Whiteboard: [Thunderbird-testfailure: Z all]
On the next push, all platforms fail: Fri Sep 8, 2017, 23:55:44

Here some excerpts from the log:
INFO -    EXCEPTION: a != b: 'hdrReplyToSenderButton,hdrSmartReplyButton,hdrForwardButton,hdrArchiveButton,hdrJunkButton,hdrTrashButton,otherActionsButton' != 'otherActionsButton,hdrTrashButton,hdrJunkButton,hdrArchiveButton,hdrForwardButton,hdrSmartReplyButton,hdrReplyToSenderButton'.
INFO -      at: test-folder-display-helpers.js line 2918
INFO -         assert_true test-folder-display-helpers.js:2918 11
INFO -         assert_equals test-folder-display-helpers.js:2905 3
INFO -         test_customize_header_toolbar_reorder_buttons test-header-toolbar.js:180 3

Looks like the value is reversed here.

Other errors are:
EXCEPTION: Timed out waiting for message display completion (28 times)

SUMMARY-UNEXPECTED-FAIL | test-message-header.js | test-message-header.js::test_a11y_attrs
EXCEPTION: headerAccessible is null

SUMMARY-UNEXPECTED-FAIL | test-tabmail-customize.js | test-tabmail-customize.js::test_redirects_toolbarbutton_drops
EXCEPTION: Button was not added as first child!: 'wrapper-calendar-tab-button' != 'wrapper-button-replyall'.

SUMMARY-UNEXPECTED-FAIL | test-tabmail-dragndrop.js | test-tabmail-dragndrop.js::test_tab_reorder_tabbar
EXCEPTION: Moving tab1 failed: '[object XULElement]' != '[object XULElement]'.

SUMMARY-UNEXPECTED-FAIL | test-tabmail-dragndrop.js | test-tabmail-dragndrop.js::test_tab_reorder_window
EXCEPTION: Moving tab to new window failed, tab still in old window

Interesting mix. Maybe some inspiration here:
Yes, possibly we need to move some of the EventUtils changes to mozmill's controller.js, e.g. MozMillController.prototype.dragToElement() .
Flags: needinfo?(acelists)
Bug 1394556 made us fix our Mozmill in bug 1395481 and M-C fixed theirs in bug 1396967. I wonder whether they'll also port changes from bug 1199729. Maybe we can ask. Kit, are is "your" Mozmill affected by bug 1199729?
Flags: needinfo?(kit)
"Only" 36 failures, I counted "TEST-UNEXPECTED-FAIL | ( | Exited with code 1 during directory run".
Summary: Mixed Mozmill failure 2017-09-08: 37 failures (Friday bustage) → Mixed Mozmill failure 2017-09-08: 36 failures (Friday bustage)
I picked
  mozmake SOLO_TEST=tabmail/test-tabmail-customize.js mozmill-one
for initial investigation:

SUMMARY-UNEXPECTED-FAIL | c:\mozilla-source\comm-central\mail\test\mozmill\tabmail\test-tabmail-customize.js | test-tabmail-customize.js::test_redirects_toolbarbutton_drops
  EXCEPTION: Button was not added as first child!: 'wrapper-calendar-tab-button' != 'wrapper-button-replyall'.
    at: test-folder-display-helpers.js line 2918
       assert_true test-folder-display-helpers.js:2918 11
       assert_equals test-folder-display-helpers.js:2905 3
       test_redirects_toolbarbutton_drops/< test-tabmail-customize.js:80 5
       test_redirects_toolbarbutton_drops test-tabmail-customize.js:69 3

The test uses drag_n_drop_element() from mail/test/mozmill/shared-modules/test-mouse-event-helpers.js which calls synthesize_[drag_start|drag_over|drop] from the same file. I noticed trapDrag() which got removed here:
Here are some bits I gleaned from here:

Same error when I run
  mozmake SOLO_TEST=tabmail/test-tabmail-customize.js mozmill-one
Without the patch, I get:
SUMMARY-UNEXPECTED-FAIL | test-tabmail-customize.js | test-tabmail-customize.js::test_redirects_toolbarbutton_drops
  EXCEPTION: toolbar.firstChild is null
    at: test-tabmail-customize.js line 80
       test_redirects_toolbarbutton_drops/< test-tabmail-customize.js:80 5
       test_redirects_toolbarbutton_drops test-tabmail-customize.js:69 3

The same with the patch.

That looks differently to your output.
Ah yes, I do not build calendar so I may have no button on the toolbar.
The Windows and Mac servers have

INFO -  SUMMARY-UNEXPECTED-FAIL | C:\slave\test\build\tests\mozmill\tabmail\test-tabmail-customize.js | test-tabmail-customize.js::test_redirects_toolbarbutton_drops
INFO -    EXCEPTION: Button was not added as first child!: 'wrapper-calendar-tab-button' != 'wrapper-button-replyall'.

So I don't know what makes you special ;-) Not being familiar with this stuff at all, the patch has some bits and pieces I got from the M-C changeset with no claim to being right or complete.
So the particular test uses test-mouse-event-helpers.js::synthesize_drag_start so I am now trying to make the changes in that function.
Correct, that's what I stated in the last paragraph of comment #5. Only that I didn't see any way to port the M-C changeset there. I'm sure the Mozmill peer has insights ;-)
Not insight yet ;)
But I got to a state that an object is dragged, but not yet dropped anywhere.
And sess = ds.getCurrentSession(); returns null so far.
Just looking at the extent of the damage by running tests locally:

mozmake SOLO_TEST=message-header/test-message-header.js mozmill-one - doesn't fail
mozmake SOLO_TEST=message-header/test-phishing-bar.js mozmill-one   - doesn't fail
mozmake SOLO_TEST=message-header/test-reply-identity.js mozmill-one - doesn't fail
mozmake SOLO_TEST=message-header/test-reply-to-list-from-address-selection.js mozmill-one - doesn't fail
mozmake SOLO_TEST=message-header/test-return-receipt.js mozmill-one - doesn't fail.

These three fail:
mozmake SOLO_TEST=message-header/test-header-toolbar.js mozmill-one
mozmake SOLO_TEST=tabmail/test-tabmail-customize.js mozmill-one
mozmake SOLO_TEST=tabmail/test-tabmail-dragndrop.js  mozmill-one

test-header-toolbar.js and test-tabmail-customize.js use "Customise Toolbar" which is somehow related to Drag 'n' Drop and the third test has that written into its name. So we're on the right track.
I got this far but it still isn't working, as said I get 'sess is null'.
Sorry for doing this, but having 36 failures due to seven tests that really fail is no fun.
Pushed by
temporarily disable seven failing tests. rs=bustage-fix
Here a convenience patch to backout the disabling of the tests.
Whiteboard: [Thunderbird-testfailure: Z all] → [Thunderbird-testfailure: Z all][Thunderbird-disabled-test]
Do these tests still fail? I understand that bug 1199729 was reversed by bug 1398883 (hidden behind a pref) since it broke some drag&drop on websites, and breaking sites is a big no-no ;-)

So do these tests fail on current M-C? Of course we'll need to finish it eventually.

If the tests pass, we could back out the disabling for now.
Summary: Mixed Mozmill failure 2017-09-08: 36 failures (Friday bustage) → Mixed Mozmill failure 2017-09-08: 7 failures (Friday bustage)
I don't have a comm-central clone so I haven't actually looked at what the tests are doing. The major change which was made was that dataTransfer objects are cleared after the event is finished. This means that you need to do a few things.
  a) Don't dispatch drag events with the test's copy of the DataTransfer, instead use dataTransfer.mozCloneForEvent() to make a copy of the DataTransfer to dispatch into that event.
  b) Collect the DataTransfer which the test helpers use within on-datatransfer-available, and use mozCloneForEvent to make a copy (as it will be cleared soon after). `drop` is IIRC what I use in my test helper.
  c) Copy over the drop effect when cloning - for annoying/complex reasons we don't copy it over by default.

The first thing I'm noticing is that you don't seem to copy the DataTransfer when dispatching other events than dragstart, which might be causing you problems. Let me know if any of those hints help? :-).
Flags: needinfo?(michael)
Thanks Michael, we'll look at it again (in due course) keeping your advice in mind.
(In reply to Jorg K (GMT+2) from comment #3)
> Bug 1394556 made us fix our Mozmill in bug 1395481 and M-C fixed theirs in
> bug 1396967. I wonder whether they'll also port changes from bug 1199729.
> Maybe we can ask. Kit, are is "your" Mozmill affected by bug 1199729?

I don't think so; AFAIK, we don't use drag and drop in TPS.
Flags: needinfo?(kit)
I ran
mozmake SOLO_TEST=message-header/test-header-toolbar.js mozmill-one
mozmake SOLO_TEST=tabmail/test-tabmail-customize.js mozmill-one
mozmake SOLO_TEST=tabmail/test-tabmail-dragndrop.js mozmill-one
and they pass again since bug 1199729 was reversed by bug 1398883 (hidden behind a pref).

So a little hard to update the tests to the new M-C behaviour right now unless I wanted to play with that pref.
Pushed by
Backed out changeset 0531d19ae371: re-enable the tests. a=jorgk
Attachment #8906346 - Attachment description: 1398383-disable-failing-tests.patch → 1398383-disable-failing-tests.patch [landed in comment #16 and backed out in comment #24]
Taking off [Thunderbird-testfailure: Z all][Thunderbird-disabled-test] since nothing fails at the moment and nothing is disabled, but the issue will return when M-C re-introduce the DataTransfer changes.
Summary: Mixed Mozmill failure 2017-09-08: 7 failures (Friday bustage) → Drag and Drop Mozmill failure 2017-09-08: 7 failures (Friday bustage)
Whiteboard: [Thunderbird-testfailure: Z all][Thunderbird-disabled-test]
Closed: 1 month ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.