Bug 1436461 [wpt PR 9429] - XSDB: don't sniff for JSON parser breaker in text/css responses., a=testonly
authorLukasz Anforowicz <lukasza@chromium.org>
Mon, 26 Mar 2018 11:21:36 +0000
changeset 467005 518ecc1080d20b10459f8745229d24ce87d2801f
parent 467004 fe89d178a4a67556834e1c2eff6dc348ecf5ef4b
child 467006 50c314da2982d67f3ee3b2c9226dd17d73840b2f
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1436461, 809259, 905634, 535838
milestone61.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 1436461 [wpt PR 9429] - XSDB: don't sniff for JSON parser breaker in text/css responses., a=testonly Automatic update from web-platform-testsXSDB: don't sniff for JSON parser breaker in text/css responses. Bug: 809259 Change-Id: I0b05c2955cf25e049c1558dc40e86b5e8e144371 Reviewed-on: https://chromium-review.googlesource.com/905634 Commit-Queue: Ɓukasz Anforowicz <lukasza@chromium.org> Reviewed-by: Nick Carter <nick@chromium.org> Cr-Commit-Position: refs/heads/master@{#535838} wpt-commits: cb76f96b962f004e97eec2b7ad13accb08fdcd77 wpt-pr: 9429 wpt-commits: cb76f96b962f004e97eec2b7ad13accb08fdcd77 wpt-pr: 9429
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/fetch/corb/README.md
testing/web-platform/tests/fetch/corb/css-with-json-parser-breaker.sub.html
testing/web-platform/tests/fetch/corb/resources/css-with-json-parser-breaker.css
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -269590,16 +269590,26 @@
      {}
     ]
    ],
    "fetch/api/response/multi-globals/relevant/relevant.html": [
     [
      {}
     ]
    ],
+   "fetch/corb/README.md": [
+    [
+     {}
+    ]
+   ],
+   "fetch/corb/resources/css-with-json-parser-breaker.css": [
+    [
+     {}
+    ]
+   ],
    "fetch/data-urls/README.md": [
     [
      {}
     ]
    ],
    "fetch/data-urls/resources/base64.json": [
     [
      {}
@@ -321066,16 +321076,22 @@
     ]
    ],
    "fetch/api/response/response-trailer.html": [
     [
      "/fetch/api/response/response-trailer.html",
      {}
     ]
    ],
+   "fetch/corb/css-with-json-parser-breaker.sub.html": [
+    [
+     "/fetch/corb/css-with-json-parser-breaker.sub.html",
+     {}
+    ]
+   ],
    "fetch/data-urls/base64.any.js": [
     [
      "/fetch/data-urls/base64.any.html",
      {}
     ],
     [
      "/fetch/data-urls/base64.any.worker.html",
      {}
@@ -543881,16 +543897,28 @@
   "fetch/api/response/response-stream-disturbed-6.html": [
    "af3dcd2f8918b5c1365191490d127dcf2cc35cd9",
    "testharness"
   ],
   "fetch/api/response/response-trailer.html": [
    "aba9a9168c083a18a85336948c1ba72ca827562f",
    "testharness"
   ],
+  "fetch/corb/README.md": [
+   "5107a057d88964121d276f1f3b3a7c0f694c9485",
+   "support"
+  ],
+  "fetch/corb/css-with-json-parser-breaker.sub.html": [
+   "20b9663300023edef5a62029e74d5100be1239fd",
+   "testharness"
+  ],
+  "fetch/corb/resources/css-with-json-parser-breaker.css": [
+   "dfcdf2ea931e4eeaaed36c471bad6b80f2c0115d",
+   "support"
+  ],
   "fetch/data-urls/README.md": [
    "83d54a0532dd87ab1fa9f5f9b7e01d9a43d91eae",
    "support"
   ],
   "fetch/data-urls/base64.any.js": [
    "ba4acd05372765d0fb03e89f13186e73467db58c",
    "testharness"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/fetch/corb/README.md
@@ -0,0 +1,21 @@
+# Tests related to Cross-Origin Resource Blocking (CORB).
+
+This directory contains tests related to the
+[Cross-Origin Resource Blocking (CORB)](https://chromium.googlesource.com/chromium/src/+/master/content/browser/loader/cross_origin_read_blocking_explainer.md) algorithm.
+
+Note that CORB is currently in very early stages of standardization path.  At
+the same time, some tests in this directory (e.g.
+`css-with-json-parser-breaker`) cover behavior spec-ed outside of CORB (making
+sure that CORB doesn't change the existing web behavior) and therefore are
+valuable independently from CORB's standardization efforts.
+
+Tests that cover behavior that is changed by CORB have to be marked as
+[tentative](http://web-platform-tests.org/writing-tests/file-names.html)
+(using `.tentative` substring in their filename) until CORB
+is included in the official
+[Fetch spec](https://fetch.spec.whatwg.org/).
+
+The tests in this directory interact with various, random features,
+but the tests have been grouped together into the `fetch/corb` directory,
+because all of these tests verify behavior that is important to the CORB
+algorithm.
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/fetch/corb/css-with-json-parser-breaker.sub.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CORB should not block text/css with a JSON parser breaker</title>
+<link rel="stylesheet" type="text/css"
+      href="http://{{domains[www1]}}:{{ports[http][0]}}/fetch/corb/resources/css-with-json-parser-breaker.css">
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<body>
+  <h1 id="header">Header example</h1>
+  <p>Paragraph body</p>
+</body>
+<script>
+test(function() {
+  var style = getComputedStyle(document.getElementById('header'));
+  assert_equals(style.getPropertyValue('color'), 'rgb(255, 0, 0)');
+}, "CORB should not block text/css with a JSON parser breaker");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/fetch/corb/resources/css-with-json-parser-breaker.css
@@ -0,0 +1,3 @@
+)]}'
+{}
+h1 { color: red; }