Skip to content

Commit

Permalink
XSDB: don't sniff for JSON parser breaker in text/css responses.
Browse files Browse the repository at this point in the history
Bug: 809259
Change-Id: I0b05c2955cf25e049c1558dc40e86b5e8e144371
  • Loading branch information
anforowicz authored and chromium-wpt-export-bot committed Feb 7, 2018
1 parent 5ed12a3 commit d101e43
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions xorb/css-with-json-parser-breaker.sub.html
@@ -0,0 +1,17 @@
<!doctype html>
<meta charset="utf-8">
<title>XORB should not block text/css with a JSON parser breaker</title>
<link rel="stylesheet" type="text/css"
href="http://{{domains[www1]}}:{{ports[http][0]}}/xorb/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)');
}, "XORB should not block text/css with a JSON parser breaker");
</script>
3 changes: 3 additions & 0 deletions xorb/resources/css-with-json-parser-breaker.css
@@ -0,0 +1,3 @@
)]}'
{}
h1 { color: red; }

0 comments on commit d101e43

Please sign in to comment.