<!DOCTYPE html>
<meta charset="utf-8">
<title>XMLHttpRequest top-bit-set header</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
async_test(function(t) {
var xhr = new XMLHttpRequest();
xhr.open('GET', 'resources/top-bit-set-header.php');
xhr.onload = t.step_func(function() {
assert_equals(
xhr.getResponseHeader('X-Custom-Header-Bytes'),
'\x80\xA0\xFF', 'header value should match expectation');
t.done();
});
xhr.send();
}, 'top-bit-set bytes in HTTP response headers should be treated as Unicode ' +
'code points');
</script>