mirror of
https://github.com/servo/servo.git
synced 2025-09-02 11:08:22 +01:00
Update web-platform-tests to revision c2e5b9fbaa17424f05ca2bb04609790a3b61d5c2
This commit is contained in:
parent
db7bb2a510
commit
f2c1b70e4a
138 changed files with 2799 additions and 851 deletions
10
tests/wpt/web-platform-tests/xhr/resources/auth10/auth.py
Normal file
10
tests/wpt/web-platform-tests/xhr/resources/auth10/auth.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
import imp
|
||||
import os
|
||||
|
||||
here = os.path.split(os.path.abspath(__file__))[0]
|
||||
|
||||
def main(request, response):
|
||||
auth = imp.load_source("", os.path.join(here,
|
||||
"..",
|
||||
"authentication.py"))
|
||||
return auth.main(request, response)
|
10
tests/wpt/web-platform-tests/xhr/resources/auth11/auth.py
Normal file
10
tests/wpt/web-platform-tests/xhr/resources/auth11/auth.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
import imp
|
||||
import os
|
||||
|
||||
here = os.path.split(os.path.abspath(__file__))[0]
|
||||
|
||||
def main(request, response):
|
||||
auth = imp.load_source("", os.path.join(here,
|
||||
"..",
|
||||
"authentication.py"))
|
||||
return auth.main(request, response)
|
|
@ -16,7 +16,7 @@
|
|||
urlstart = 'www1.'+location.host + location.pathname.replace(/\/[^\/]*$/, '/')
|
||||
client.withCredentials = true
|
||||
user = token()
|
||||
client.open("GET", location.protocol+'//'+urlstart + "resources/auth1/auth.py", false, user, 'pass')
|
||||
client.open("GET", location.protocol+'//'+urlstart + "resources/auth10/auth.py", false, user, 'pass')
|
||||
client.setRequestHeader("x-user", user)
|
||||
assert_throws("NetworkError", function(){ client.send(null) })
|
||||
assert_equals(client.responseText, '')
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
var client = new XMLHttpRequest(),
|
||||
urlstart = location.host + location.pathname.replace(/\/[^\/]*$/, '/'),
|
||||
user = token()
|
||||
client.open("GET", location.protocol+'//'+urlstart + "resources/auth1/auth.py", false, user, 'pass')
|
||||
client.open("GET", location.protocol+'//'+urlstart + "resources/auth11/auth.py", false, user, 'pass')
|
||||
client.setRequestHeader("x-user", user)
|
||||
client.send(null)
|
||||
// Repeat request but *without* credentials in the open() call.
|
||||
// Is the UA supposed to cache credentials from above request and use them? Yes.
|
||||
client.open("GET", location.protocol+'//'+urlstart + "resources/auth1/auth.py", false)
|
||||
client.open("GET", location.protocol+'//'+urlstart + "resources/auth11/auth.py", false)
|
||||
client.setRequestHeader("x-user", user)
|
||||
client.send(null)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue