 can read JSON encoded HTTP request headers of the XHR below,
       the messaging works as expected.</p>

    <pre id="received_message">Running...</pre>

    <script>
      promise_test(function() {
        var urlPath = '/common/security-features/subresource/xhr.py';
        var url = location.protocol + "//www1." + location.hostname + ":" + location.port +
                  urlPath;
        return requestViaXhr(url)
          .then(function(message) {
              var pre = document.getElementById('rec