зеркало из https://github.com/mozilla/gecko-dev.git
c29d9ac401
We can assume that if middle button's click event on a link isn't consumed by any event handlers including system event group's, it will cause open new tab. With this assumption, we can avoid using setTimeout which causes random orange. However, unfortunately, in e10s mode, the default is NOT consumed at window in bubbling phase but consumed at that time. So, when not working the link is expected, we cannot check Event.defaultPrevented. But fortunately, we can check if the page is loaded after that. Note that for testing this, the test needs to check if an event handler which is either in default group or system group consumed a click event. However, this runs as mochitest-plain. Therefore, Event.defaultPrevented returns false if the event is consumed only in the system group's event listener. For avoiding this issue, this patch adds defaultPreventedInAnyGroups() into SpecialPowers. In SpecialPowers, Event.defaultPrevented is accessed from chrome context. Therefore, we can get the result what this test needs. MozReview-Commit-ID: Cfn4lFR1dfI --HG-- extra : rebase_source : 51feb768bd38f62cc19c2f4aecaaea0135190599 |
||
---|---|---|
.. | ||
content | ||
Makefile.in | ||
bootstrap.js | ||
install.rdf | ||
jar.mn | ||
moz.build |