Bug 1540400 [wpt PR 16114] - Revert "Change unoptimized-images feature policy to unoptimized-lossy-images.", a=testonly
authorPeter Kasting <pkasting@chromium.org>
Thu, 18 Apr 2019 11:57:05 +0000
changeset 529947 48f6da6608ae226017ff9725a4b239f222f09c3c
parent 529946 b679c2b5b93305b25618b6b63e8291a9ea142b95
child 529948 179f3521ae439afa03d55aee53a58c2fae76e590
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1540400, 16114, 40949, 1524869, 942659, 1531354, 644488, 1540145, 644637
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1540400 [wpt PR 16114] - Revert "Change unoptimized-images feature policy to unoptimized-lossy-images.", a=testonly Automatic update from web-platform-tests Revert "Change unoptimized-images feature policy to unoptimized-lossy-images." This reverts commit efbe41b8ceda53be0e82b4c9a4576cc95c84a3b5. Reason for revert: Mac bots are failing consistently, see e.g. https://ci.chromium.org/p/chromium/builders/ci/Mac10.10%20Tests/40949 Original change's description: > 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} TBR=flackr@chromium.org,kenrb@chromium.org,pdr@chromium.org,paulmeyer@chromium.org,iclelland@chromium.org Change-Id: I0dc0449dc2d07c5dafa84c7123ec664c902a73fb No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 942659 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1540145 Reviewed-by: Peter Kasting <pkasting@chromium.org> Commit-Queue: Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/master@{#644637} -- wpt-commits: ef78bcb3870680baf3b2f965def061b5858ac88c wpt-pr: 16114
testing/web-platform/tests/feature-policy/reporting/unoptimized-images-reporting-onload.html
testing/web-platform/tests/feature-policy/reporting/unoptimized-images-reporting-onload.html.headers
testing/web-platform/tests/feature-policy/reporting/unoptimized-images-reporting.html
testing/web-platform/tests/feature-policy/reporting/unoptimized-images-reporting.html.headers
testing/web-platform/tests/feature-policy/reporting/unoptimized-lossy-images-reporting-onload.html
testing/web-platform/tests/feature-policy/reporting/unoptimized-lossy-images-reporting-onload.html.headers
testing/web-platform/tests/feature-policy/reporting/unoptimized-lossy-images-reporting.html
testing/web-platform/tests/feature-policy/reporting/unoptimized-lossy-images-reporting.html.headers
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/feature-policy/reporting/unoptimized-images-reporting-onload.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <script src='/resources/testharness.js'></script>
+    <script src='/resources/testharnessreport.js'></script>
+  </head>
+  <body>
+    <script>
+var image = new Image();
+image.src = "./unoptimized-image.jpg";
+
+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.disposition, "enforce");
+};
+
+async_test(t => {
+  new ReportingObserver(t.step_func_done(check_report_format),
+                        {types: ['feature-policy-violation'], buffered: true}).observe();
+}, "unoptimized-images Report Format");
+    </script>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/feature-policy/reporting/unoptimized-images-reporting-onload.html.headers
@@ -0,0 +1,1 @@
+Feature-Policy: unoptimized-images 'none'
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/feature-policy/reporting/unoptimized-images-reporting.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <script src='/resources/testharness.js'></script>
+    <script src='/resources/testharnessreport.js'></script>
+  </head>
+  <body>
+    <img src="./unoptimized-image.jpg">
+    <script>
+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.disposition, "enforce");
+};
+
+async_test(t => {
+  new ReportingObserver(t.step_func_done(check_report_format),
+                        {types: ['feature-policy-violation'], buffered: true}).observe();
+}, "unoptimized-images Report Format");
+    </script>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/feature-policy/reporting/unoptimized-images-reporting.html.headers
@@ -0,0 +1,1 @@
+Feature-Policy: unoptimized-images 'none'
deleted file mode 100644
--- a/testing/web-platform/tests/feature-policy/reporting/unoptimized-lossy-images-reporting-onload.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <script src='/resources/testharness.js'></script>
-    <script src='/resources/testharnessreport.js'></script>
-  </head>
-  <body>
-    <script>
-var image = new Image();
-image.src = "./unoptimized-image.jpg";
-
-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-lossy-images");
-  assert_equals(report.body.disposition, "enforce");
-};
-
-async_test(t => {
-  new ReportingObserver(t.step_func_done(check_report_format),
-                        {types: ['feature-policy-violation'], buffered: true}).observe();
-}, "unoptimized-images Report Format");
-    </script>
-  </body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/feature-policy/reporting/unoptimized-lossy-images-reporting-onload.html.headers
+++ /dev/null
@@ -1,1 +0,0 @@
-Feature-Policy: unoptimized-lossy-images 'none'
deleted file mode 100644
--- a/testing/web-platform/tests/feature-policy/reporting/unoptimized-lossy-images-reporting.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <script src='/resources/testharness.js'></script>
-    <script src='/resources/testharnessreport.js'></script>
-  </head>
-  <body>
-    <img src="./unoptimized-image.jpg">
-    <script>
-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-lossy-images");
-  assert_equals(report.body.disposition, "enforce");
-};
-
-async_test(t => {
-  new ReportingObserver(t.step_func_done(check_report_format),
-                        {types: ['feature-policy-violation'], buffered: true}).observe();
-}, "unoptimized-images Report Format");
-    </script>
-  </body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/feature-policy/reporting/unoptimized-lossy-images-reporting.html.headers
+++ /dev/null
@@ -1,1 +0,0 @@
-Feature-Policy: unoptimized-lossy-images 'none'