New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 710226 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Not working on Chrome any more
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

external/wpt/cssom-view/MediaQueryList-001.html fails except on Linux and Mac Retina

Project Member Reported by qyears...@chromium.org, Apr 10 2017

Issue description

Upstream test link:
https://github.com/w3c/web-platform-tests/blob/master/cssom-view/MediaQueryList-001.html

Test output on all platforms that fail is:

This is a testharness.js-based test.
FAIL matchMedia assert_equals: Expected value for device-aspect-ratio is 1280/800 expected true but got false
Harness: the test ran to completion.
 

Comment 1 by meade@chromium.org, Apr 11 2017

Cc: bugsnash@chromium.org
Labels: Needs-Feedback
Owner: qyears...@chromium.org
I ran this test on my Windows 10 machine, and it passed. I tried both run-webkit-tests and running content_shell directly with the following output:



C:\src\chrome\src\third_party\WebKit> Tools\Scripts\run-webkit-tests -t GnDebug external\wpt\css\cssom-view-1\MediaQueryList-001.html
Using port 'win-win10'
Test configuration: <win10, x86, debug>
View the test results at file://C:\src\chrome\src\out\GnDebug\layout-test-results/results.html
View the archived results dashboard at file://C:\src\chrome\src\out\GnDebug\layout-test-results/dashboard.html
Using random order with seed: 1491885795
Baseline search path: win -> generic
Using Debug build
Pixel tests enabled
Regular timeout: 18000, slow test timeout: 90000
Command line: C:\src\chrome\src\out\GnDebug\content_shell.exe --run-layout-test --enable-direct-write --enable-crash-reporter --crash-dumps-dir=C:\src\chrome\src\out\GnDebug\crash-dumps -

Found 1 test; running 1, skipping 0.

Ruby is not installed; can't generate pretty patches.

Running 1 content_shell.

The test ran as expected.

- or -

C:\src\chrome\src> out\GnDebug\content_shell.exe --run-layout-test --no-sandbox third_party\WebKit\LayoutTests\external\wpt\css\cssom-view-1\MediaQueryList-001.html

C:\src\chrome\src>#READY
Content-Type: text/plain
This is a testharness.js-based test.
PASS matchMedia
Harness: the test ran to completion.

#EOF
#EOF
#EOF



It sounds like the test is testing matchMedia output expecting a particular device aspect ratio, which seems brittle. Do we really ever want to have this test?

[1] https://developer.mozilla.org/en/docs/Web/API/Window/matchMedia

Comment 2 by meade@chromium.org, Apr 11 2017

Cc: meade@chromium.org
Cc: zcorpan@gmail.com
It's a little hard to track who added that test because of the csswg-test merge, but as far as I know:
 - The tests should test conformance to a spec.
 - The tests should be broadly applicable to different browsers, devices, & platforms.

It seems like this test is just testing making any query with window.matchMedia. Could this test be changed so that the query can be expected to always evaluate to true on all devices?

Like, what about changing the query to window.matchMedia("(min-width: 1px)")?

If we make this change, we should get feedback from @plinss and @zcorpan.
Project Member

Comment 4 by sheriffbot@chromium.org, Apr 11 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "meade@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by sim...@opera.com, Apr 11 2017

> Like, what about changing the query to window.matchMedia("(min-width: 1px)")?

That seems very reasonable.

Comment 6 by shend@chromium.org, Apr 12 2017

Labels: Needs-Feedback
Hi qyearsley, could you add @plinss to cc so we can get feedback about this? Thanks!
Cc: qyears...@chromium.org
Owner: ----
Status: ExternalDependency (was: Unconfirmed)
Can't find the email address of @plinss :-/ Made an issue on GitHub: https://github.com/w3c/web-platform-tests/issues/5541
Labels: Update-Weekly

Comment 9 by sim...@opera.com, Apr 18 2017

I think this should not be blocking on feedback from plinss. He didn't write the test and is not directly involved in cssom-view. You have received positive feedback from me already.
Cc: -bugsnash@chromium.org

Comment 11 by meade@chromium.org, Apr 20 2017

Owner: meade@chromium.org
Status: Assigned (was: ExternalDependency)
Ok, how about we just fix it then.

I just posted https://codereview.chromium.org/2829913003 :)
Project Member

Comment 12 by bugdroid1@chromium.org, Apr 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0380ef0910a520f4336ba3e8d3c6fdcc007e5cee

commit 0380ef0910a520f4336ba3e8d3c6fdcc007e5cee
Author: meade <meade@chromium.org>
Date: Mon Apr 24 01:02:50 2017

Change MediaQueryList-001 to test on min-width: 1px

This is instead of the device aspect ratio, as that is brittle.

BUG= 710226 

Review-Url: https://codereview.chromium.org/2829913003
Cr-Commit-Position: refs/heads/master@{#466573}

[modify] https://crrev.com/0380ef0910a520f4336ba3e8d3c6fdcc007e5cee/third_party/WebKit/LayoutTests/external/wpt/cssom-view/MediaQueryList-001.html

Comment 13 by meade@chromium.org, Apr 27 2017

Status: Fixed (was: Assigned)

Comment 14 by meade@chromium.org, Apr 27 2017

Status: Assigned (was: Fixed)
Oops, realised I still need re-enable the test.
Project Member

Comment 15 by bugdroid1@chromium.org, May 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d3051352e6cf8653c74a8b163d166eebe57feb42

commit d3051352e6cf8653c74a8b163d166eebe57feb42
Author: meade <meade@chromium.org>
Date: Fri May 05 03:47:15 2017

Re-enable external/wpt/cssom-view/MediaQueryList-001.html

Now that I've changed it to be less brittle, this should just work.
(see https://codereview.chromium.org/2829913003)

BUG= 710226 

Review-Url: https://codereview.chromium.org/2864593002
Cr-Commit-Position: refs/heads/master@{#469589}

[modify] https://crrev.com/d3051352e6cf8653c74a8b163d166eebe57feb42/third_party/WebKit/LayoutTests/TestExpectations

Status: Fixed (was: Assigned)

Sign in to add a comment