gecko-dev/ipc/ipdl
Hiroyuki Ikezoe 5f958f80c7 Bug 1486971 - Test for dynamically change of the prefers-reduced-motion setting on MacOSX. r=froydnj,mstange
The framework to simulate the setting change works as following;

 - nsIDOMWindowUtils.setPrefersReducedMotion() calls an IPC function which ends
   up calling nsChildView::SetPrefersReducedMotion() in the parent process

 - nsChildView::SetPrefersReducedMotion() sets the given value into
   nsLookAndFeel::mPrefersReducedMotionCached just like we set the value queried
   via NSWorkspace.accessibilityDisplayShouldReduceMotion in the parent process
   and send a notification which is the same notification MacOSX sends when the
   system setting changed

 - Normally the cached value is cleared before quering new values since the
   cache value is stale, but in this case the value is up-to-date one, so
   nsChildView::SetPrefersReducedMotion() tells that we don't need to clear the
   cache, and nsIDOMWindowUtils.resetPrefersReducedMotion() resets that state
   of 'we don't need to clear the cache'

There are two test cases with the framework in this commit, one is just setting
the value and checking the value queried by window.matchMedia.  The other one is
receiving 'change' event and checking the value of the event target.

Note that to make this test works the patch for bug 1478212 is necessary since
the test runs in an iframe.

Depends on D5003

Differential Revision: https://phabricator.services.mozilla.com/D5004

--HG--
extra : moz-landing-system : lando
2018-09-15 01:00:07 +00:00
..
ipdl Bug 1486547 - renamed the mState field on generated protocol classes; r=froydnj 2018-08-27 18:20:17 +00:00
test Bug 1486547 - renamed the mState field on generated protocol classes; r=froydnj 2018-08-27 18:20:17 +00:00
.flake8 Bug 1468273 - Fix flake8/pep8 issue by hand in ipc/ r=froydnj 2018-07-12 12:03:02 +02:00
Makefile.in Bug 1455892 - Use a tracking stub file rather than a phony target to speed up ipdl in incremental builds. r=froydnj 2018-05-03 12:54:21 -07:00
ipdl.py Bug 1468273 - Fix flake8/pep8 issue by hand in ipc/ r=froydnj 2018-07-12 12:03:02 +02:00
message-metadata.ini Remove ReadLockHandle and ReadLockInit code (bug 1445008, r=aosmond) 2018-03-13 17:00:18 -05:00
moz.build Bug 1451859 - Part 2: Add sanitizer coverage to a handful of places relevant to IPC. r=posidron 2018-04-05 15:48:11 -04:00
msgtype-components
sync-messages.ini Bug 1486971 - Test for dynamically change of the prefers-reduced-motion setting on MacOSX. r=froydnj,mstange 2018-09-15 01:00:07 +00:00