Bug 1540393 [wpt PR 16113] - Change unoptimized-images feature policy to unoptimized-lossy-images., a=testonly

Automatic update from web-platform-tests
Change unoptimized-images feature policy to unoptimized-lossy-images.

This makes it more clear that this policy applies only to lossy image
types (for now, just JPEG). This patch also makes the implementation
more generic in order to make the policy compatible with parsed
policy values and to pave the way for implementing a
lossless-enforcing version of the unoptimized-images policy as well.

These changes have been pulled from a larger partially reviewed CL:
https://chromium-review.googlesource.com/c/chromium/src/+/1524869

Bug: 942659
Change-Id: I0242ac900b1653b89d6d8dbd63616003dcaaba62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1531354
Commit-Queue: Paul Meyer <paulmeyer@chromium.org>
Reviewed-by: Paul Meyer <paulmeyer@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#644488}

--

wpt-commits: f19a0c4003dc469cd0972dab425acdcdd3a7d1d7
wpt-pr: 16113
This commit is contained in:
Paul Meyer 2019-04-18 11:56:58 +00:00 коммит произвёл James Graham
Родитель 4a200cf28c
Коммит f2c509c372
6 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -1 +0,0 @@
Feature-Policy: unoptimized-images 'none'

Просмотреть файл

@ -1 +0,0 @@
Feature-Policy: unoptimized-images 'none'

Просмотреть файл

@ -13,7 +13,7 @@ var check_report_format = (reports, observer) => {
let report = reports[0];
assert_equals(report.type, "feature-policy-violation");
assert_equals(report.url, document.location.href);
assert_equals(report.body.featureId, "unoptimized-images");
assert_equals(report.body.featureId, "unoptimized-lossy-images");
assert_equals(report.body.disposition, "enforce");
};

Просмотреть файл

@ -0,0 +1 @@
Feature-Policy: unoptimized-lossy-images 'none'

Просмотреть файл

@ -11,7 +11,7 @@ var check_report_format = (reports, observer) => {
let report = reports[0];
assert_equals(report.type, "feature-policy-violation");
assert_equals(report.url, document.location.href);
assert_equals(report.body.featureId, "unoptimized-images");
assert_equals(report.body.featureId, "unoptimized-lossy-images");
assert_equals(report.body.disposition, "enforce");
};

Просмотреть файл

@ -0,0 +1 @@
Feature-Policy: unoptimized-lossy-images 'none'