-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests for density-corrected size #23789
Conversation
There are no reviewers for this pull request. Please reach out on W3C's irc server (irc.w3.org, port 6665) on channel #testing (web client) to get help with this. Thank you! |
46acd86
to
5c4427b
Compare
How does Content-DPR relate to this? I thought this was only about EXIF? What would be interesting to see:
|
Oops, probably a copy-paste thing (this is based on old content-dpr tests, as it has a similar purpose)
Sure, I can add that.
yea I can try to integrate exiftool into WPT-runner... let's see how that works |
These test include images that have EXIF values that specify density-corrected size And they assert that the intrinsic size for those images is corrected by that EXIF. WhatWG PR: whatwg/html#5574
5c4427b
to
e1092ad
Compare
New patch uses piexif.js to generate density-corrected size images on the fly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests look good! I want someone more tied to the project to verify it's OK to land third party code.
await test_valid({width: 10, height: 20, preferredWidth: 10, preferredHeight: 40, resolutionX: 72, resolutionY: 36, resolutionUnit: 2}) | ||
await test_valid({width: 30, height: 30, preferredWidth: 90, preferredHeight: 30, resolutionX: 24, resolutionY: 72, resolutionUnit: 2}) | ||
|
||
await test_valid({width: 10, height: 20, preferredWidth: 20, preferredHeight: 40, resolutionX: 36, resolutionY: 36, resolutionUnit: 2}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between those 4 tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lores, hires, only one of the dimension, change in aspect ratio.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, forgot to erase some identical tests
@foolip - can you take a look at the third-party code here and make sure this is the right way to land it? |
@yoavweiss how to include third party JS is the topic of web-platform-tests/rfcs#46, which isn't resolved yet, but I'd recommend following the suggestion in web-platform-tests/rfcs#46 (comment). That is, put it in a |
Already merged as part of Chromium CL. |
These test include images that have EXIF values that specify density-corrected size
And they assert that the intrinsic size for those images is corrected by that EXIF.
WhatWG PR: whatwg/html#5574