Closed Bug 1606503 Opened 2 months ago Closed 1 month ago

ubuntu1804 - layout/style/test/test_mq_prefers_reduced_motion_dynamic.html | Does not matches prefers-reduced-motion: reduced) when the system sets prefers-reduced-motion false

Categories

(Core :: CSS Parsing and Computation, defect, P5)

defect

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: hiro)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Filed by: egao [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer.html#?job_id=283078764&repo=try
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/NqIwOn6kQtqLFMjNEthrDg/runs/0/artifacts/public/logs/live_backing.log


suite: mochitest
chunk: 14

notes: qr, debug

context:
[task 2019-12-31T21:19:41.713Z] 21:19:41 INFO - TEST-START | layout/style/test/test_mq_prefers_reduced_motion_dynamic.html
[task 2019-12-31T21:19:41.814Z] 21:19:41 INFO - GECKO(1232) | [Parent 1232, Main Thread] WARNING: we only accept nsIURI interface type, patch welcome: file /builds/worker/workspace/build/src/dom/ipc/PropertyBagUtils.cpp, line 112
[task 2019-12-31T21:19:42.031Z] 21:19:42 INFO - GECKO(1232) | [Child 1339, Main Thread] WARNING: Trying to request nsIHttpChannel from DocumentChannelChild, this is likely broken: file /builds/worker/workspace/build/src/netwerk/ipc/DocumentChannelChild.cpp, line 63
[task 2019-12-31T21:19:42.120Z] 21:19:42 INFO - TEST-INFO | started process screentopng
[task 2019-12-31T21:19:42.590Z] 21:19:42 INFO - TEST-INFO | screentopng: exit 0
[task 2019-12-31T21:19:42.591Z] 21:19:42 INFO - Buffered messages logged at 21:19:42
[task 2019-12-31T21:19:42.592Z] 21:19:42 INFO - add_task | Entering test
[task 2019-12-31T21:19:42.593Z] 21:19:42 INFO - Buffered messages finished
[task 2019-12-31T21:19:42.593Z] 21:19:42 INFO - TEST-UNEXPECTED-FAIL | layout/style/test/test_mq_prefers_reduced_motion_dynamic.html | Does not matches prefers-reduced-motion: reduced) when the system sets prefers-reduced-motion false
[task 2019-12-31T21:19:42.594Z] 21:19:42 INFO - SimpleTest.ok@SimpleTest/SimpleTest.js:277:18
[task 2019-12-31T21:19:42.596Z] 21:19:42 INFO - @layout/style/test/test_mq_prefers_reduced_motion_dynamic.html:45:5
[task 2019-12-31T21:19:42.596Z] 21:19:42 INFO - asyncnextTick/<@SimpleTest/SimpleTest.js:1824:34
[task 2019-12-31T21:19:42.596Z] 21:19:42 INFO - nextTick@SimpleTest/SimpleTest.js:1840:11
[task 2019-12-31T21:19:42.596Z] 21:19:42 INFO - setTimeout handler
SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:689:43
[task 2019-12-31T21:19:42.596Z] 21:19:42 INFO - add_task@SimpleTest/SimpleTest.js:1784:17
[task 2019-12-31T21:19:42.596Z] 21:19:42 INFO - @layout/style/test/test_mq_prefers_reduced_motion_dynamic.html:39:9
[task 2019-12-31T21:19:42.597Z] 21:19:42 INFO - Not taking screenshot here: see the one that was previously logged
[task 2019-12-31T21:19:42.597Z] 21:19:42 INFO - TEST-UNEXPECTED-FAIL | layout/style/test/test_mq_prefers_reduced_motion_dynamic.html | Does not matches (prefers-reduced-motion) when the system sets prefers-reduced-motion false
[task 2019-12-31T21:19:42.597Z] 21:19:42 INFO - SimpleTest.ok@SimpleTest/SimpleTest.js:277:18
[task 2019-12-31T21:19:42.597Z] 21:19:42 INFO - @layout/style/test/test_mq_prefers_reduced_motion_dynamic.html:48:5
[task 2019-12-31T21:19:42.597Z] 21:19:42 INFO - asyncnextTick/<@SimpleTest/SimpleTest.js:1824:34
[task 2019-12-31T21:19:42.597Z] 21:19:42 INFO - nextTick@SimpleTest/SimpleTest.js:1840:11
[task 2019-12-31T21:19:42.597Z] 21:19:42 INFO - setTimeout handler
SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:689:43
[task 2019-12-31T21:19:42.597Z] 21:19:42 INFO - add_task@SimpleTest/SimpleTest.js:1784:17
[task 2019-12-31T21:19:42.597Z] 21:19:42 INFO - @layout/style/test/test_mq_prefers_reduced_motion_dynamic.html:39:9
[task 2019-12-31T21:19:42.597Z] 21:19:42 INFO - Not taking screenshot here: see the one that was previously logged
[task 2019-12-31T21:19:42.597Z] 21:19:42 INFO - TEST-UNEXPECTED-FAIL | layout/style/test/test_mq_prefers_reduced_motion_dynamic.html | Matches (prefers-reduced-motion: no-preference) when the system sets prefers-reduced-motion false
[task 2019-12-31T21:19:42.597Z] 21:19:42 INFO - SimpleTest.ok@SimpleTest/SimpleTest.js:277:18
[task 2019-12-31T21:19:42.597Z] 21:19:42 INFO - @layout/style/test/test_mq_prefers_reduced_motion_dynamic.html:51:5
[task 2019-12-31T21:19:42.598Z] 21:19:42 INFO - asyncnextTick/<@SimpleTest/SimpleTest.js:1824:34
[task 2019-12-31T21:19:42.598Z] 21:19:42 INFO - nextTick@SimpleTest/SimpleTest.js:1840:11
[task 2019-12-31T21:19:42.599Z] 21:19:42 INFO - setTimeout handler
SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:689:43
[task 2019-12-31T21:19:42.599Z] 21:19:42 INFO - add_task@SimpleTest/SimpleTest.js:1784:17
[task 2019-12-31T21:19:42.599Z] 21:19:42 INFO - @layout/style/test/test_mq_prefers_reduced_motion_dynamic.html:39:9
[task 2019-12-31T21:19:42.599Z] 21:19:42 INFO - add_task | Leaving test
[task 2019-12-31T21:19:42.600Z] 21:19:42 INFO - add_task | Entering test
[task 2019-12-31T21:19:42.782Z] 21:19:42 INFO - GECKO(1232) | [Child 1339, Main Thread] WARNING: NS_ENSURE_TRUE(!mHasOrHasHadOwnerWindow || mOwnerWindow) failed: file /builds/worker/workspace/build/src/dom/events/DOMEventTargetHelper.cpp, line 321
[task 2019-12-31T21:19:42.782Z] 21:19:42 INFO - GECKO(1232) | [Child 1339, Main Thread] WARNING: NS_ENSURE_TRUE(!mHasOrHasHadOwnerWindow || mOwnerWindow) failed: file /builds/worker/workspace/build/src/dom/events/DOMEventTargetHelper.cpp, line 321
[task 2019-12-31T21:24:57.405Z] 21:24:57 INFO - Not taking screenshot here: see the one that was previously logged
[task 2019-12-31T21:24:57.406Z] 21:24:57 INFO - TEST-UNEXPECTED-FAIL | layout/style/test/test_mq_prefers_reduced_motion_dynamic.html | Test timed out.
[task 2019-12-31T21:24:57.407Z] 21:24:57 INFO - SimpleTest.ok@SimpleTest/SimpleTest.js:277:18
[task 2019-12-31T21:24:57.407Z] 21:24:57 INFO - reportError@SimpleTest/TestRunner.js:121:22
[task 2019-12-31T21:24:57.407Z] 21:24:57 INFO - TestRunner._checkForHangs@SimpleTest/TestRunner.js:142:18
[task 2019-12-31T21:24:57.407Z] 21:24:57 INFO - setTimeout handlerTestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.407Z] 21:24:57 INFO - setTimeout handler
TestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.407Z] 21:24:57 INFO - setTimeout handlerTestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.407Z] 21:24:57 INFO - setTimeout handler
TestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.407Z] 21:24:57 INFO - setTimeout handlerTestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.407Z] 21:24:57 INFO - setTimeout handler
TestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.407Z] 21:24:57 INFO - setTimeout handlerTestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.407Z] 21:24:57 INFO - setTimeout handler
TestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.407Z] 21:24:57 INFO - setTimeout handlerTestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.407Z] 21:24:57 INFO - setTimeout handler
TestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.408Z] 21:24:57 INFO - setTimeout handlerTestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.408Z] 21:24:57 INFO - setTimeout handler
TestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.408Z] 21:24:57 INFO - setTimeout handlerTestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.408Z] 21:24:57 INFO - setTimeout handler
TestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.408Z] 21:24:57 INFO - setTimeout handlerTestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.409Z] 21:24:57 INFO - setTimeout handler
TestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.409Z] 21:24:57 INFO - setTimeout handlerTestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.409Z] 21:24:57 INFO - setTimeout handler
TestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.409Z] 21:24:57 INFO - setTimeout handlerTestRunner._checkForHangs@SimpleTest/TestRunner.js:170:15
[task 2019-12-31T21:24:57.409Z] 21:24:57 INFO - TestRunner.runTests/<@SimpleTest/TestRunner.js:388:20
[task 2019-12-31T21:24:57.409Z] 21:24:57 INFO - promise callback
TestRunner.runTests@SimpleTest/TestRunner.js:375:50
[task 2019-12-31T21:24:57.409Z] 21:24:57 INFO - RunSet.runtests@SimpleTest/setup.js:201:14
[task 2019-12-31T21:24:57.409Z] 21:24:57 INFO - RunSet.runall@SimpleTest/setup.js:180:12
[task 2019-12-31T21:24:57.409Z] 21:24:57 INFO - hookupTests@SimpleTest/setup.js:273:12
[task 2019-12-31T21:24:57.410Z] 21:24:57 INFO - parseTestManifest@http://mochi.test:8888/manifestLibrary.js:48:13
[task 2019-12-31T21:24:57.410Z] 21:24:57 INFO - getTestManifest/req.onload@http://mochi.test:8888/manifestLibrary.js:61:28
[task 2019-12-31T21:24:57.410Z] 21:24:57 INFO - EventHandlerNonNullgetTestManifest@http://mochi.test:8888/manifestLibrary.js:57:3
[task 2019-12-31T21:24:57.410Z] 21:24:57 INFO - hookup@SimpleTest/setup.js:253:20
[task 2019-12-31T21:24:57.410Z] 21:24:57 INFO - EventHandlerNonNull
@http://mochi.test:8888/tests?autorun=1&closeWhenDone=1&consoleLevel=INFO&manifestFile=tests.json&dumpOutputDirectory=%2Ftmp&cleanupCrashes=true:11:1
[task 2019-12-31T21:24:58.411Z] 21:24:58 INFO - GECKO(1232) | MEMORY STAT | vsize 2856MB | residentFast 202MB | heapAllocated 23MB
[task 2019-12-31T21:24:58.427Z] 21:24:58 INFO - TEST-OK | layout/style/test/test_mq_prefers_reduced_motion_dynamic.html | took 316714ms

:hiro - this is a failure that I have observed on ubuntu1804, when run with debug and quantumrenderer only.

The try push is here: https://treeherder.mozilla.org/#/jobs?repo=try&group_state=expanded&tier=1%2C2%2C3&revision=ef5335a919cf84f3ed6d6b29e9ac5c159733f808

Flags: needinfo?(hikezoe.birchill)

This is presumably because the corresponding system setting, "gtk-enable-animations" is enabled on ubuntu18.04 by default so that setting the value to false and waiting for a frame is not sufficient to be sure the value has changed. Why I didn't listen a media query change event there is that in the case where the system setting is false by default, we can't observe the change event. Bu anyways, we should wait for a change event or frame depending on the initial system value.

Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED
Flags: needinfo?(hikezoe.birchill)
See Also: → 1606525
Pushed by hikezoe.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f7a55a3ba113
Wait for a frame or a media query change event depending on the corresponding initial system setting. r=emilio

Backed out changeset f7a55a3ba113 (Bug 1606503) for causing mochitest failures at test_mq_prefers_reduced_motion_dynamic.html

Push with failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&selectedJob=283542557&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&searchStr=android%2C7.0%2Cx86-64%2Copt%2Cmochitests%2Ctest-android-em-7.0-x86_64%2Fopt-geckoview-mochitest-e10s-4%2Cm%284%29&revision=f7a55a3ba113bace558ae908163ac622a8020439

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=283542557&repo=autoland&lineNumber=5166

[task 2020-01-05T23:59:20.599Z] 23:59:20     INFO -  1963 INFO TEST-START | layout/style/test/test_mq_prefers_reduced_motion_dynamic.html
[task 2020-01-06T00:04:26.145Z] 00:04:26     INFO -  Buffered messages logged at 23:59:15
[task 2020-01-06T00:04:26.145Z] 00:04:26     INFO -  1964 INFO add_task | Entering test
[task 2020-01-06T00:04:26.146Z] 00:04:26     INFO -  Buffered messages finished
[task 2020-01-06T00:04:26.146Z] 00:04:26  WARNING -  1965 INFO TEST-UNEXPECTED-FAIL | layout/style/test/test_mq_prefers_reduced_motion_dynamic.html | Test timed out.
[task 2020-01-06T00:04:26.147Z] 00:04:26     INFO -      SimpleTest.ok@SimpleTest/SimpleTest.js:277:18
[task 2020-01-06T00:04:26.147Z] 00:04:26     INFO -      reportError@SimpleTest/TestRunner.js:121:22
[task 2020-01-06T00:04:26.147Z] 00:04:26     INFO -      TestRunner._checkForHangs@SimpleTest/TestRunner.js:142:18
Flags: needinfo?(hikezoe.birchill)
Backout by dvarga@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9d401beea71d
Backed out changeset f7a55a3ba113 for causing mochitest failures at test_mq_prefers_reduced_motion_dynamic.html

I haven't run the test on Android... Actually on Android the way to replicate system setting changes is just flipping an internal variable, so that it doesn't link to the actual system state. (Whereas on Linux, we change LookAndFeelIntCache which is tied to the system state, the cache is also used on Mac as well). Why I didn't use the same cache machinery on Android is that, it was a workaround to query the up-to-date system state in child processes on MacOSX (see bug 1486971 for detail), but it's also been used on GTK since bug 1596317 to workaround an issue that changing the system setting doesn't affect in child processes on GTK. So, I think now it's time to use the LookAndFeelIntCache on Android as well.

Flags: needinfo?(hikezoe.birchill)

It turns out that we can't simply use LookAndFeelIntCache on Android, since the cache is used for ColorID so using the cache for eIntID_XX will collide indices. That's really unfortunate.... I don't know why we decided to use the cache for ColorID.

Makoto, can you please elaborate why we can't query system color in the child processes on Android?

I did bit poke around the code, it actually failed in nsLookAndFeel::GetSystemColors() to obtain an AndroidBridge instance in a child process, but AndroidBridge::GetSystemColors() doesn't require the instance at all, so I did change it static and used it directly, it seems to work properly.

Flags: needinfo?(m_kato)

(In reply to Hiroyuki Ikezoe (:hiro) from comment #10)

Makoto, can you please elaborate why we can't query system color in the child processes on Android?

I did bit poke around the code, it actually failed in nsLookAndFeel::GetSystemColors() to obtain an AndroidBridge instance in a child process, but AndroidBridge::GetSystemColors() doesn't require the instance at all, so I did change it static and used it directly, it seems to work properly.

AndroidBridge is parent process only, but you can use JNI even if on child process. I think that you can move AndroidBridge::GetSystemColors to nsLookAndFeel and you use JNI directly, then it works well.

Also, by bug 1500876, I remove sync IPC since old code has some critical issue.

Flags: needinfo?(m_kato)
Depends on: 1607124

Thanks! I filed bug 1607124 for that.

No longer depends on: 1607124
Depends on: 1607124

Apologies if I came in a bit late, if you'd like to test the changes on the ubuntu1804 test image, please use ./mach try fuzzy --ubuntu-bionic and select the linux64 jobs as normal.

This is required since mochitest-e10s still uses the venerable ubuntu1604 test image at the moment.

Now both of GTK and MacOSX backends use the same machinery, LookAndFeelInt, for
prefers-reduced-motion. And we are going to use it on Android as well so it'd
make sense to move the code into base classes.

On Windows we can also use the same LookAndFeelInt machinery and probably
all we have to do is to call SendNotifyMessage with SPI_SETCLIENTAREAANIMATION
in SetPrefersReducedMotionOverrideForTest.

With this change we have the same setup for prefers-reduced-motion so that
we can change the value with the same manner in automated tests.

Depends on D59022

Attachment #9119235 - Attachment description: Bug 1606503 - Move prefers-reduced-motion bits for testing into base classes. r?emilio → Bug 1606503 - Move prefers-reduced-motion bits for testing into LookAndFeel. r?emilio
Pushed by hikezoe.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8aada655d8bc
Move prefers-reduced-motion bits for testing into LookAndFeel. r=emilio
https://hg.mozilla.org/integration/autoland/rev/371f74475fb9
Get the value for prefers-reduced-motion via LookAndFeelInt. r=geckoview-reviewers,snorp
https://hg.mozilla.org/integration/autoland/rev/7e9d421335e0
Wait for a frame or a media query change event depending on the corresponding initial system setting. r=emilio

/builds/worker/workspace/build/src/widget/nsXPLookAndFeel.cpp:1099:11: error: variable 'value' set but not used [-Werror=unused-but-set-variable]

I have no idea why the compiler complains it's not used...

/builds/worker/workspace/build/src/widget/nsXPLookAndFeel.cpp:1103:65: sorry, unimplemented: non-trivial designated initializers not supported
[task 2020-01-14T02:55:37.815Z] 02:55:37 INFO - LookAndFeelInt{eIntID_PrefersReducedMotion, .value = value});

Urg...

I tend to want to use the original code which causes a warning.

Flags: needinfo?(hikezoe.birchill)

Probably .id = id stops the error I guess? Let's try it on try.

Backout by shindli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c2e1a25742a6
Backed out 3 changesets for causing bustages in nsXPLookAndFeel.cpp CLOSED TREE
Pushed by hikezoe.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bedaab429960
Move prefers-reduced-motion bits for testing into LookAndFeel. r=emilio
https://hg.mozilla.org/integration/autoland/rev/42f457399218
Get the value for prefers-reduced-motion via LookAndFeelInt. r=geckoview-reviewers,snorp
https://hg.mozilla.org/integration/autoland/rev/e71639544560
Wait for a frame or a media query change event depending on the corresponding initial system setting. r=emilio
Regressions: 1610974
You need to log in before you can comment on or make changes to this bug.