<!doctype html>
<html>
  <head>
    <title>XMLHttpRequest: User-Agent header is preserved on redirect</title>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
  </head>
  <body>
    <div id="log"></div>
    <script>
      var ua = "Servo/wptrunner";
      var test = async_test()
      test.step(function() {
        var client = new XMLHttpRequest()
          client.onreadystatechange = function() {
            test.step(function() {
              if(client.readyState == 4) {
                assert_equals(client.responseText, "user-agent,")
                test.done()
              }
            })
          }
        client.open("POST", "resources/redirect.py?location="+encodeURIComponent("inspect-headers.py?filter_value="+ua))
        client.send(null)
      })
    </script>
  </body>
</html>

<!doctype html>
<html>
  <head>
    <title>XMLHttpRequest: User-Agent header is preserved on redirect</title>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
  </head>
  <body>
    <div id="log"></div>
    <script>
      var test = async_test()
      test.step(function() {
        var client = new XMLHttpRequest()
          client.onreadystatechange = function() {
            test.step(function() {
              if(client.readyState == 4) {
                assert_equals(client.responseText, 'user-agent: '+navigator.userAgent+'\n')
                test.done()
              }
            })
          }
        client.open("POST", "resources/redirect.py?location="+encodeURIComponent("inspect-headers.py?filter_name=user-agent"))
        client.send(null)
      })
    </script>
  </body>
</html>

Update "preserve UserAgent on redirect" test to be browser-agnostic.
Update "preserve UserAgent on redirect" test to be browser-agnostic.
