mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Update "preserve UserAgent on redirect" test to be browser-agnostic.
This commit is contained in:
parent
9a87f830fc
commit
21bb8bf8ad
1 changed files with 2 additions and 3 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue