Revision e5478286b1bd4e84889619e4c75f017f6021a2d9 authored by Darren Shen on 12 April 2018, 11:59:24 UTC, committed by Chromium WPT Sync on 12 April 2018, 11:59:24 UTC
Introduces the <angle> data type. Test fails because we compute offset-rotate to a pair rather than 'as specified' had to rebaseline all the tests. Bug: 820299 Change-Id: Ifdc192550b0b544b9887af80c259b3bfeede556b Reviewed-on: https://chromium-review.googlesource.com/1003433 Commit-Queue: Darren Shen <shend@chromium.org> Reviewed-by: nainar <nainar@chromium.org> Cr-Commit-Position: refs/heads/master@{#550146}
1 parent 19a42b9
redirect-preflight-2.htm
<!DOCTYPE html>
<meta charset=utf-8>
<title>CORS - preflight after a redirect</title>
<meta name=author title="Odin Hørthe Omdal" href="mailto:odiho@opera.com">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=support.js?pipe=sub></script>
<script src=/common/utils.js></script>
<h1>Preflight after redirect</h1>
<div id=log></div>
<script>
async_test(function() {
var test_id = "fail_" + new Date().getTime()
var client = new XMLHttpRequest()
var last_url = CROSSDOMAIN + 'resources/cors-makeheader.py?origin=*&ident=' + test_id
client.open('GET', 'resources/cors-makeheader.py?origin=*&location=' + encodeURIComponent(last_url))
client.setRequestHeader('custom-header', 'admin')
client.onerror = this.step_func(function() {
this.done()
})
client.onload = this.step_func(function(e) { assert_unreached("Request should not succeed!") })
client.send()
}, "Same-origin custom-header request, redirect to cross-origin fails after doing a non-successful preflight")
async_test(function() {
var client = new XMLHttpRequest()
var uuid_token = token();
var last_url = CROSSDOMAIN + 'resources/cors-makeheader.py?headers=custom-header&origin=*&token=' + uuid_token;
client.open('GET', 'resources/cors-makeheader.py?origin=*&location=' + encodeURIComponent(last_url))
client.setRequestHeader('custom-header', 'admin')
client.onload = this.step_func(function() {
// Test that I got custom-header
/* To check whether we did a preflight */
client.open('GET', 'resources/cors-makeheader.py?check&token=' + uuid_token)
client.onload = this.step_func(function() {
assert_equals(client.response, "1", "did preflight")
this.done()
})
client.onerror = this.step_func(function(e) { assert_unreached("Error on getting preflight data") })
client.send()
})
client.onerror = this.step_func(function(e) { assert_unreached("Error during request", e) })
client.send()
}, "Same-origin custom-header request, redirect to cross-origin succeeds after doing a preflight")
</script>
Computing file changes ...