Bug 1184607 P11 Fix fetch CORS tests to not expect same-origin requests that redirect to preflight. r=nsm

This commit is contained in:
Ben Kelly 2015-08-31 14:26:30 -07:00
parent 02091a795c
commit 9885740a5f

View File

@ -1125,7 +1125,7 @@ function testRedirects() {
},
],
},
{ pass: 0,
{ pass: 1,
method: "POST",
body: "hi there",
headers: { "Content-Type": "text/plain",
@ -1140,6 +1140,24 @@ function testRedirects() {
],
},
{ pass: 0,
method: "POST",
body: "hi there",
headers: { "Content-Type": "text/plain",
"my-header": "myValue",
},
hops: [{ server: "http://mochi.test:8888",
},
{ server: "http://test1.example.com",
allowOrigin: origin,
allowHeaders: "my-header",
},
{ server: "http://test2.example.com",
allowOrigin: origin,
allowHeaders: "my-header",
}
],
},
{ pass: 1,
method: "DELETE",
hops: [{ server: "http://mochi.test:8888",
},
@ -1148,6 +1166,18 @@ function testRedirects() {
},
],
},
{ pass: 0,
method: "DELETE",
hops: [{ server: "http://mochi.test:8888",
},
{ server: "http://test1.example.com",
allowOrigin: origin,
},
{ server: "http://test2.example.com",
allowOrigin: origin,
},
],
},
{ pass: 0,
method: "POST",
body: "hi there",