OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
5 <title>Request: init with request or url</title> | 5 <title>Request: init with request or url</title> |
6 <meta name="help" href="https://fetch.spec.whatwg.org/#request"> | 6 <meta name="help" href="https://fetch.spec.whatwg.org/#request"> |
7 <meta name="help" href="https://url.spec.whatwg.org/#concept-url-serializer"
> | 7 <meta name="help" href="https://url.spec.whatwg.org/#concept-url-serializer"
> |
8 <meta name="author" title="Canon Research France" href="https://www.crf.cano
n.fr"> | 8 <meta name="author" title="Canon Research France" href="https://www.crf.cano
n.fr"> |
9 <script src="/resources/testharness.js"></script> | 9 <script src="/resources/testharness.js"></script> |
10 <script src="/resources/testharnessreport.js"></script> | 10 <script src="/resources/testharnessreport.js"></script> |
(...skipping 23 matching lines...) Expand all Loading... |
34 "credentials" : "include", | 34 "credentials" : "include", |
35 "cache" : "no-cache", | 35 "cache" : "no-cache", |
36 "redirect" : "error", | 36 "redirect" : "error", |
37 "integrity" : "Request's Integrity", | 37 "integrity" : "Request's Integrity", |
38 "headers" : headers, | 38 "headers" : headers, |
39 "body" : "Request's body" | 39 "body" : "Request's body" |
40 }; | 40 }; |
41 | 41 |
42 var expectedDefault = {"method" : "GET", | 42 var expectedDefault = {"method" : "GET", |
43 "url" : location.href, | 43 "url" : location.href, |
44 "referrer" : "http://{{host}}:{{ports[http][0]}}/", | 44 "referrer" : "about:client", |
45 "referrerPolicy" : "", | 45 "referrerPolicy" : "", |
46 "mode" : "cors", | 46 "mode" : "cors", |
47 "credentials" : "omit", | 47 "credentials" : "omit", |
48 "cache" : "default", | 48 "cache" : "default", |
49 "redirect" : "follow", | 49 "redirect" : "follow", |
50 "integrity" : "", | 50 "integrity" : "", |
51 "headers" : emptyHeaders | 51 "headers" : emptyHeaders |
52 }; | 52 }; |
53 | 53 |
54 var requestDefault = new Request(""); | 54 var requestDefault = new Request(""); |
(...skipping 20 matching lines...) Expand all Loading... |
75 test(function() { | 75 test(function() { |
76 var url = "http://url.test:1234/path/subpath?query=true"; | 76 var url = "http://url.test:1234/path/subpath?query=true"; |
77 url += "#fragment"; | 77 url += "#fragment"; |
78 expectedInitialized["url"] = url; | 78 expectedInitialized["url"] = url; |
79 var requestToCheck = new Request(url , initValuesDict); | 79 var requestToCheck = new Request(url , initValuesDict); |
80 checkRequest(requestToCheck, expectedInitialized); | 80 checkRequest(requestToCheck, expectedInitialized); |
81 }, "Check request values when initialized from url and init values"); | 81 }, "Check request values when initialized from url and init values"); |
82 </script> | 82 </script> |
83 </body> | 83 </body> |
84 </html> | 84 </html> |
OLD | NEW |