New issue
Advanced search Search tips

Issue 844781 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

CORB tests broken by recent WPT pull

Project Member Reported by lukasza@chromium.org, May 18 2018

Issue description

Two CORB tests are currently broken:

[6/14] external/wpt/fetch/corb/img-png-mislabeled-as-html-nosniff.tentative.sub.html failed unexpectedly (reference mismatch)
[13/14] external/wpt/fetch/corb/img-html-correctly-labeled.sub.html failed unexpectedly (reference mismatch)

Both seem to have been broken by the PR at https://github.com/w3c/web-platform-tests/pull/11004

I don't understand why the -expected.html pattern worked and the new -ref.html pattern doesn't... :-/
 
Owner: foolip@chromium.org
Status: Assigned (was: Untriaged)
foolip@, could you PTAL? (since you authored https://github.com/w3c/web-platform-tests/pull/11004 and also since I think you have more experience than me working with WPT and how one is supposed to use reference documents in tests)

FWIW, img-html-correctly-labeled.sub-ref.html and img-html-correctly-labeled.sub.html are almost identical - the only difference is that the URL in the <img> tag is cross-origin in the test file and is same-origin in the reference file.  Let me know if you have any questions about CORB or these specific tests.
FWIW, I've started a CL here: https://crrev.com/c/1066816 (but I don't actually understand what broke the test / wouldn't know how to fix it other than reverting CORB-related part of https://github.com/w3c/web-platform-tests/pull/11004)

Comment 4 by foolip@chromium.org, May 21 2018

OK, so what changed is that now the expected screenshot shows a blue image, where before both expected and actual was a blocked image, a blue/white box with a question mark in it.

Comment 5 by foolip@chromium.org, May 21 2018

Cc: robertma@chromium.org
As it turns out these three tests all use the same ref:
external/wpt/fetch/corb/img-html-correctly-labeled.sub.html
external/wpt/fetch/corb/img-png-mislabeled-as-html-nosniff.tentative.sub.html
external/wpt/fetch/corb/img-png-mislabeled-as-html.sub.html

And that ref is img-png-mislabeled-as-html.sub-ref.html. Verified by appending a unique string to each of the refs and seeing what showed up in the "expected" rendering when they failed.

When the files were called -expected.html, something outside of the wpt manifest handling took precedence, and they were matched by filename instead. robertma@, do you know what this something else, and should we consider it a bug? Or perhaps just add a wpt lint disallowing files to be called *-expected.* to avoid this kind of problem?

The fix will be to use the right refs.
Thank you very much for the investigation and the CL with the fix - much appreciated!
*-expected.html does have special meaning in both Blink and WebKit test runners. Philip's comment in #5 is basically correct. This behaviour is confusing in external/wpt with a few potential failure modes:

1. Test authors create tests with wrong ref targets, but due to the magic filename, tests seem to work in Chromium and will fail when exported.
2. By accidentally naming a test (reference) file as *-expected.html, it becomes the reference of some other test unintentionally and hence breaks that test.

Let me see if I can disable this magic suffix in external/wpt in Chromium, which is my preferred solution. If that isn't easy, we can consider implementing lints (either in Chromium or WPT upstream).
@foolip, has this been fixed?
Status: Fixed (was: Assigned)
Yes!

Sign in to add a comment