author Hiroyuki Ikezoe <>
Sat, 15 Sep 2018 01:00:07 +0000
changeset 492144 67a5acf7363d9dd2c8532967ec1beb0c200abc2c
parent 351496 54cf74de41dfa8dfd04fcdf01616609e7f7e2704
permissions -rw-r--r--
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:

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at
# Welcome to the new world of configure. We're working on moving to a
# python based configure. In the meanwhile, remains of the old autoconf
# based configure is in
# If you need to add something, please come talk to the build system
# peers for now.
# Because adding a configure file in the tree is going to conflict with
# existing configure files in people's (and automation) work trees, and
# because some automation jobs are still running autoconf and configure
# "manually", this file is actually an m4 file that is processed by
# autoconf, but doesn't call any autoconf macros. The `divert` line
# below ensures the script that follows is output by autoconf.
: "divert(0)dnl"

SRCDIR=$(dirname $0)
export OLD_CONFIGURE="$SRCDIR"/old-configure

which python2.7 > /dev/null && exec python2.7 "$TOPSRCDIR/" "$@" || exec python "$TOPSRCDIR/" "$@"