Closed
Bug 1393160
Opened 8 years ago
Closed 8 years ago
Detect the visibility of the target element in EventUtils.synthesizeDrop
Categories
(Testing :: Mochitest, enhancement)
Testing
Mochitest
Tracking
(firefox57 fixed)
RESOLVED
FIXED
mozilla57
| Tracking | Status | |
|---|---|---|
| firefox57 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
Details
Attachments
(1 file)
|
3.04 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
(derived from bug 1393158)
the following test is unexpectedly passed now.
https://dxr.mozilla.org/mozilla-central/source/browser/components/downloads/test/browser/browser_indicatorDrop.js
the testcase emulates drag-and-drop onto download button, but the button is now invisible (changed by bug 1371765),
so, the testcase should fail since that action is not possible manually.
we should detect the visibility of the target element in EventUtils.synthesizeDrop and it should fail if the target element is hidden.
| Assignee | ||
Comment 1•8 years ago
|
||
bug 1371765 should be in "see also" field since this bug cannot be fixed unless bug 1371765 gets backed out, (or add some workaround for the change),
otherwise the browser_indicatorDrop.js fails.
See Also: → 1371765
Comment 2•8 years ago
|
||
I don't envy the person whose job it would be to green up all the tests this would cause to go intermittent...
Component: General → Mochitest
Product: Firefox → Testing
Comment 3•8 years ago
|
||
(In reply to Tooru Fujisawa [:arai] from comment #1)
> bug 1371765 should be in "see also" field since this bug cannot be fixed
> unless bug 1371765 gets backed out, (or add some workaround for the change),
> otherwise the browser_indicatorDrop.js fails.
No, we would just have to fix the test. But that's hardly the only test that would need fixing. It's not useful to link those via 'see also'. If this fix had been in place at the time of bug 1371765, I would have just added the workaround, as I did for several of the other downloads test (ie add a download to the downloads panel, wait for the button to be fully visible, then do the dnd).
| Assignee | ||
Comment 4•8 years ago
|
||
(In reply to :Gijs from comment #3)
> (ie add a
> download to the downloads panel, wait for the button to be fully visible,
> then do the dnd).
I don't think that flow makes sense, even in a testcase.
why do users need to download something in order to download another thing?
Comment 5•8 years ago
|
||
(In reply to Tooru Fujisawa [:arai] from comment #4)
> (In reply to :Gijs from comment #3)
> > (ie add a
> > download to the downloads panel, wait for the button to be fully visible,
> > then do the dnd).
>
> I don't think that flow makes sense, even in a testcase.
> why do users need to download something in order to download another thing?
The test case is there to verify that the behaviour works, not to justify the behaviour or to keep it the same forevermore or anything else. The testcase serves the UI, not the other way around. If we think it's not useful anymore, maybe we should remove the drag/drop support altogether. We can make that decision in the other bugs. But either way, we're getting further away from the subject of this bug, which is about modifying the test framework.
| Assignee | ||
Comment 6•8 years ago
|
||
Made sendDragEvent to check the visibility of the target element and now it fails if the target element is hidden (actually, if it has zero size)
there I think only dragend can be performed even if the target is hidden, since the target element can become hidden after starting drag session on it.
| Assignee | ||
Comment 7•8 years ago
|
||
forgot to explain the reasoning why I chose width and height of bounding box for detecting visibility.
I was about to check hidden attribute or style.display property, but it would require checking ancestor nodes recursively, and also it needs dedicated code for XUL and HTML,
so, instead of checking visibility directly, I use the size of bounding box, that becomes zero if it's hidden or display=none,
and also it covers the case that it's visible but actually has zero size; in all cases drag event cannot be performed manually, since user cannot mousedown or mouseup on that element.
Updated•8 years ago
|
Attachment #8901483 -
Flags: review?(bugs) → review+
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/241116278286
Detect visibility of the drag event target and fail if hidden. r=smaug
| Assignee | ||
Comment 9•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/241116278286e4c38fd7461da5eae52ba409ae1b
Bug 1393160 - Detect visibility of the drag event target and fail if hidden. r=smaug
Comment 10•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Comment 11•8 years ago
|
||
Seems like this change updated the baseline for a Talos test:
== Change summary for alert #9097 (as of August 30 2017 07:08 UTC) ==
Improvements:
2% tsvg_static summary windows7-32 opt e10s 61.03 -> 59.67
For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=9097
Comment 12•8 years ago
|
||
highly unlikely.
Comment 13•8 years ago
|
||
(In reply to Ionuț Goldan [:igoldan], Performance Sheriffing from comment #11)
> Seems like this change updated the baseline for a Talos test:
>
> == Change summary for alert #9097 (as of August 30 2017 07:08 UTC) ==
>
> Improvements:
>
> 2% tsvg_static summary windows7-32 opt e10s 61.03 -> 59.67
>
> For up to date results, see:
> https://treeherder.mozilla.org/perf.html#/alerts?id=9097
This was a test-only change, so almost certainly no. Please re-check for the actual cause of this change.
Flags: needinfo?(ionut.goldan)
Comment 14•8 years ago
|
||
:Gijs, you are right. I will mark this as invalid.
Flags: needinfo?(igoldan)
You need to log in
before you can comment on or make changes to this bug.
Description
•