gecko-dev/widget/tests
Masayuki Nakano 36f73c43d8 Bug 1435717 - Make calling WidgetEvent::PreventDefault*() stop cross process forwarding too r=smaug
Currently, if an event is consumed in the main process, EventStateManager
does not send it to remote process.  However, this is unexpected behavior
for some WidgetKeyboardEvent dispatchers.  OS sometimes has consumed native
key events before sending applications.  For example, Alt key on Windows
should activate menu bar of focused window but Alt key may be consumed before
focused window receives the event.  In such case, we mark Alt keyboard event
as "consumed before dispatch", and chrome treat it like as its preventDefault()
is called in web content.  (Note that for compatibility with other browsers,
the consumed state is not exposed to web content.  So, Event.defaultPrevented
returns false in web content.)

Therefore, we need to treat "consumed" state and "cross process forwarding"
state separately.  This patch makes calling WidgetEvent::PreventDefault()
always stops cross process forwarding for backward compatibility.  Additionally,
for the special case mentioned above, this patch makes
WidgetEvent::PreventDefaultBeforeDispatch() take additional argument,
|aIfStopCrossProcessForwarding|.  If this is CrossProcessForwarding::eStop,
the event won't be sent to remote process as same as calling PreventDefault().
Otherwise, CrossProcessForwarding::eHold, PreventDefaultBeforeDispatch() call
does not change "cross process forwarding" state.  I.e., if the event's
StopCrossProcessForwarding() and PreventDefault() are not called until
EventStateManager::PostHandleEvent(), the event will be sent to remote process
as usual.

MozReview-Commit-ID: IQGWJvXetxV

--HG--
extra : rebase_source : 4ccdd500e80b8fe29e469ac3b85578e1c07c8358
2018-06-25 18:17:18 +09:00
..
unit Bug 1457329 - disabled test_taskbar_jumplistitems.js on Windows 10 for frequent falures. r=jmaher 2018-05-14 02:19:00 +03:00
bug586713_window.xul
chrome_context_menus_win.xul Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
chrome.ini Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
empty_window.xul
file_bug596600.html Bug 1388028 - Update tests within widget/tests to comply with new data: URI inheritance model. r=smaug 2017-08-07 20:13:12 +02:00
file_input_events_on_deactive_window.html Bug 1380641 - Convert test_input_events_on_deactive_window.xul to comply with new data: URI inheritance model. r=smaug 2017-07-14 12:17:13 +02:00
file_secure_input.html Bug 1388028 - Update tests within widget/tests to comply with new data: URI inheritance model. r=smaug 2017-08-07 20:13:12 +02:00
mochitest.ini Bug 1435717 - Make calling WidgetEvent::PreventDefault*() stop cross process forwarding too r=smaug 2018-06-25 18:17:18 +09:00
moz.build Bug 1417653 - clean up a few moz.build files that have typos. r=gbrown 2017-11-16 08:56:51 -05:00
native_menus_window.xul Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
native_mouse_mac_window.xul Bug 1446961, remove obsolete calls to showPopup and replace usages of the popup box object with the same methods defined on popups, r=paolo 2018-04-27 11:04:36 -04:00
standalone_native_menu_window.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
taskbar_previews.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
test_AltGr_key_events_in_web_content_on_windows.html Bug 1435717 - Make calling WidgetEvent::PreventDefault*() stop cross process forwarding too r=smaug 2018-06-25 18:17:18 +09:00
test_assign_event_data.html Bug 1446253 - Make EventUtils.synthesizeComposition() dispatch keydown and keyup event in default r=smaug 2018-03-16 22:35:07 +09:00
test_bug343416.xul Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
test_bug413277.html
test_bug428405.xul Backed out 2 changesets (bug 1444760) for ES lint failure in /builds/worker/checkouts/gecko/browser/base/content/browser.js on a CLOSED TREE 2018-03-25 15:29:54 +03:00
test_bug429954.xul Bug 1433175 - semi-automated indent fix, r=Mossop. 2018-02-28 18:51:34 +01:00
test_bug444800.xul Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
test_bug466599.xul Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
test_bug478536.xul
test_bug485118.xul Bug 1431246 - Create and update scrollbar markup in nsScrollbarFrame r=enndeakin+6102 2018-04-09 22:01:02 +08:00
test_bug517396.xul Bug 1433175 - semi-automated indent fix, r=Mossop. 2018-02-28 18:51:34 +01:00
test_bug522217.xul
test_bug538242.xul Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
test_bug565392.html Bug 1448398 followup to fix Windows-only test. r=kmag pending 2018-03-26 16:42:01 -04:00
test_bug586713.xul
test_bug593307.xul Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
test_bug596600.xul Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
test_bug673301.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
test_bug760802.xul Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
test_bug1123480.xul Bug 1462937: Update callers to use nsIFile::GetDirectoryEntries as a nsIDirectoryEnumerator. r=froydnj 2018-05-19 20:17:45 -07:00
test_bug1151186.html
test_chrome_context_menus_win.xul
test_clipboard.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
test_composition_text_querycontent.xul
test_imestate.html Bug 1433175 - semi-automated indent fix, r=Mossop. 2018-02-28 18:51:34 +01:00
test_input_events_on_deactive_window.xul Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
test_key_event_counts.xul
test_keycodes.xul Bug 900750 - part 6: Rename |name| in test_keycodes.xul to |currentTestName| r=smaug 2018-06-04 20:41:43 +09:00
test_keypress_event_with_alt_on_mac.html Bug 1464016 - TextInputHandler should not clear alt/ctrl/meta modifiers of eKeyPress event before sending TextEventDispatcher r=m_kato 2018-05-24 20:59:48 +09:00
test_mouse_scroll.xul Bug 1390398: fix failures on windows for new data: URI inheritance model. r=smaug 2017-08-15 18:09:28 +08:00
test_native_key_bindings_mac.html Bug 1337392 - Update test cases to match new cursor behavior. r=smaug 2017-03-08 16:41:42 +01:00
test_native_menus.xul
test_native_mouse_mac.xul
test_panel_mouse_coords.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
test_picker_no_crash.html
test_platform_colors.xul Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
test_plugin_input_event.html Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
test_plugin_scroll_consistency.html
test_position_on_resize.xul Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
test_scrollbar_colors.html Bug 1464722 part 6 - Enable scrollbar colors test on mac. r=spohl 2018-06-25 10:16:25 +10:00
test_secure_input.html Bug 1388028 - Update tests within widget/tests to comply with new data: URI inheritance model. r=smaug 2017-08-07 20:13:12 +02:00
test_sizemode_events.xul Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
test_standalone_native_menu.xul
test_system_status_bar.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
test_taskbar_progress.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
test_transferable_overflow.xul Bug 1462937: Update callers to use nsIFile::GetDirectoryEntries as a nsIDirectoryEnumerator. r=froydnj 2018-05-19 20:17:45 -07:00
test_wheeltransaction.xul
TestAppShellSteadyState.cpp Bug 1455052 part 13. Remove nsIDOMEvent. r=masayuki 2018-04-20 12:55:31 -04:00
TestChromeMargin.cpp Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj 2017-08-16 16:48:52 -07:00
utils.js
window_bug429954.xul
window_bug478536.xul Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
window_bug522217.xul
window_bug538242.xul
window_bug593307_centerscreen.xul
window_bug593307_offscreen.xul
window_composition_text_querycontent.xul Bug 1465875 part 1. Eliminate pointless QIs to nsIDOMNSEditableElement. r=qdot 2018-06-01 22:35:22 -04:00
window_imestate_iframes.html Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
window_mouse_scroll_win.html Bug 1446850. Get rid of nsIDOMMouseScrollEvent. r=qdot 2018-03-19 15:50:56 -04:00
window_picker_no_crash_child.html
window_state_windows.xul Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
window_wheeltransaction.xul Bug 1358017 - Part 9: Updates some existing mochitests which are not meant to test default actions for wheel events but are affected by auto-dir scrolling. r=masayuki 2018-04-03 20:23:19 +08:00