Skip to content

Commit

Permalink
Update "preserve UserAgent on redirect" test to be browser-agnostic.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Jun 13, 2015
1 parent 9a87f83 commit 21bb8bf
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -8,19 +8,18 @@
<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,")
assert_equals(client.responseText, 'user-agent: '+navigator.userAgent+'\n')
test.done()
}
})
}
client.open("POST", "resources/redirect.py?location="+encodeURIComponent("inspect-headers.py?filter_value="+ua))
client.open("POST", "resources/redirect.py?location="+encodeURIComponent("inspect-headers.py?filter_name=user-agent"))
client.send(null)
})
</script>
Expand Down

0 comments on commit 21bb8bf

Please sign in to comment.