gecko-dev/testing/specialpowers
Masayuki Nakano c29d9ac401 Bug 972110 Rewrite editor/libeditor/test_bug674770-1.html without setTimeout() for avoiding intermittent failure r=smaug
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
2016-09-22 10:54:51 +09:00
..
content Bug 972110 Rewrite editor/libeditor/test_bug674770-1.html without setTimeout() for avoiding intermittent failure r=smaug 2016-09-22 10:54:51 +09:00
Makefile.in Bug 1219442 - Re-write specialpowers as a restartless addon, r=jmaher 2015-11-05 10:00:59 -05:00
bootstrap.js Bug 1219442 - Re-write specialpowers as a restartless addon, r=jmaher 2015-11-05 10:00:59 -05:00
install.rdf Bug 1219442 - Re-write specialpowers as a restartless addon, r=jmaher 2015-11-05 10:00:59 -05:00
jar.mn Bug 1027734 - Convert mozPay to WebIDL. r=bzbarsky. 2016-01-26 18:38:03 +01:00
moz.build Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00