gecko-dev/testing
Masayuki Nakano e8eae5c2a2 Bug 1300937 part.2 Automated tests which synthesize native key events on Windows should specify scan code value explicitly r=smaug
On Windows, some keys are called "extended key".  Their scan code include 0xE000.  For example, Enter key in standard position is 0x001C but Numpad's Enter key is 0xE01C.  Unfortunately, both of them cause same virtual keycode value, VK_RETURN.  Therefore, currently, nsIDOMWindowUtils.sendNativeKey() can synthesize only one native key event of them (only non-extended key's event).  Additionally, MapVirtualKeyEx() API with MAPVK_VK_TO_VSC (even with MAPVK_VK_TO_VSC_EX) don't return extended scancode value as expected.

For solving these issues, we should include scan code value to the virtual keycode value at calling sendNativeKey().

Fortunately, virtual keycode value on Windows is 0 ~ 255 (0x00 ~ 0xFF) but aNativeKeyCode of sendNativeKey() is int32_t.  So, we can use upper 16 bit for specifying scan code.

This patch explicitly specifies scan code value at defining WIN_VK_* in NativeKeyCodes.js.  Additionally, this patch duplicates native virtual keycode definition for Home, End, Insert, Delete, PageUp, PageDown, ArrowUp, ArrowLeft, ArrowDown, ArrowRight and Enter as WIN_VK_* and WIN_VK_NUMPAD_*.  This makes automated tests can specify both positions' keys explicitly.

Finally, this patch adds some tests to test_keycodes.xul for testing KeyboardEvent.code value of those keys in both positions.

MozReview-Commit-ID: 8n1rQ71dilg

--HG--
extra : rebase_source : 0f4bb9193aa06cd7985590636b77a6e2a71ac2e4
2016-09-13 19:38:23 +09:00
..
config Bug 1294546 - Update tooltool manifest for android host-utils, for osx hosts; r=me 2016-08-22 13:51:33 -06:00
crashtest Bug 1286657 - Add manifest for autophone webrtc crashtest job; r=bc 2016-08-03 12:20:48 -04:00
docker Bug 1296397 - Add source checkout to web platform test tasks; r=dustin 2016-09-14 08:20:10 -07:00
firefox-ui Bug 1274943 - Ensure to wait for the update dialog after a forced fallback. r=maja_zf 2016-09-06 11:55:54 +02:00
gtest Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
instrumentation Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
luciddream
marionette Bug 1290806 - Fix TestSwitchWindow.test_windows by waiting for the newly opened window. r=maja_zf 2016-09-08 18:00:36 +02:00
mochitest Bug 1300937 part.2 Automated tests which synthesize native key events on Windows should specify scan code value explicitly r=smaug 2016-09-13 19:38:23 +09:00
modules Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
mozbase Bug 1285299 - Add pytest_mozlog plugin to mozlog; r=jgraham 2016-09-08 11:43:11 +02:00
mozharness Merge m-c to autoland. a=merge 2016-09-13 20:46:39 -04:00
profiles Bug 1264110 - turn on Presentation logging on treeherder. r=me. 2016-08-30 19:25:19 +08:00
puppeteer Bug 1296677 - Remove update billboard support from firefox-puppeteer. r=rstrong 2016-08-24 09:37:47 +02:00
runtimes Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
specialpowers Bug 1271115 - Merge ChromeUtils.js into EventUtils.js; r=jmaher 2016-08-25 16:57:09 +03:00
talos Bug 1295292 - don't sort tpaint results, r=jmaher 2016-09-12 13:39:10 +01:00
tools Bug 1300163 - Add support for Android mochitests to interactive loaners, r=armenzg 2016-09-02 14:43:53 -04:00
tps Bug 1293426 - Allow TPS config to specify preference values so it can be pointed at non-production servers r=markh 2016-08-11 10:18:13 -04:00
web-platform Bug 1301621 - Parse URL ports as 16 bit; r=valentin 2016-09-09 15:42:42 +08:00
xpcshell Bug 1300163 - Reuse the 'e10s' value from the mozharness config on interactive loaners, r=armenzg 2016-09-02 14:42:36 -04:00
cppunittest.ini Bug 1297306 - part4:rename IsEnumFittingWithin with EnumTypeFitsWithin and move it to mfbt/EnumTypeTraits.h. r=froydnj 2016-09-07 10:20:16 +08:00
mach_commands.py Bug 1281570 - Provide recommendations to fix typos when using 'mach try'. r=chmanchester 2016-06-24 21:36:39 -04:00
README.txt
remotecppunittests.py Bug 1295323 - s/CalledProcessError/subprocess.CalledProcessError/ r=dminor 2016-08-01 19:01:12 -07:00
runcppunittests.py Bug 1281918 - make runcppunittests filter out non-executable files when given a directory; r=chmanchester 2016-06-24 04:02:18 -04:00
testsuite-targets.mk Backed out 2 changesets (bug 1283919) for being the wrong way to fix this a=backout 2016-09-07 14:22:21 -07:00

Common testing tools for mozilla codebase projects, test suite definitions
for automated test runs, tests that don't fit anywhere else, and other fun
stuff