mirror of
https://github.com/servo/servo.git
synced 2025-09-15 17:38:23 +01:00
Update web-platform-tests to revision ea3cae9746c39e8192b91181044144c60d9388e8
This commit is contained in:
parent
9513544e91
commit
b3f94b4330
194 changed files with 22476 additions and 15435 deletions
|
@ -16,6 +16,12 @@ def main(request, response):
|
|||
elif tao == 'origin':
|
||||
# case-sensitive match for origin, pass
|
||||
response.headers.set('Timing-Allow-Origin', origin)
|
||||
elif tao.startswith('origin_port'):
|
||||
# case-sensitive match for origin and port, pass
|
||||
origin_parts = origin.split(':')
|
||||
host = origin_parts[0] + ':' + origin_parts[1]
|
||||
port = tao.split('origin_port_')[1]
|
||||
response.headers.set('Timing-Allow-Origin', host + ':' + port)
|
||||
elif tao == 'space':
|
||||
# space separated list of origin and wildcard, fail
|
||||
response.headers.set('Timing-Allow-Origin', (origin + ' *'))
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<script>
|
||||
const url = '{{location[scheme]}}://{{host}}:{{ports[http][1]}}/resource-timing/resources/TAOResponse.py?tao=origin_port_{{ports[http][1]}}';
|
||||
const observe = (list, observer) => {
|
||||
const entry = list.getEntries()[0];
|
||||
const sum = entry.redirectStart +
|
||||
entry.redirectEnd +
|
||||
entry.domainLookupStart +
|
||||
entry.domainLookupEnd +
|
||||
entry.connectStart +
|
||||
entry.connectEnd +
|
||||
entry.secureConnectionStart +
|
||||
entry.requestStart +
|
||||
entry.responseStart +
|
||||
entry.transferSize +
|
||||
entry.encodedBodySize +
|
||||
entry.decodedBodySize;
|
||||
|
||||
const result = sum == 0 ? 'PASS' : 'FAIL';
|
||||
window.top.postMessage(result, '*');
|
||||
}
|
||||
let observer = new PerformanceObserver(observe);
|
||||
observer.observe({ entryTypes: ["resource"] });
|
||||
fetch(url);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue