|
|
|
|
| 135 |
finish(); |
135 |
finish(); |
| 136 |
}; |
136 |
}; |
| 137 |
|
137 |
|
| 138 |
gExpected++; |
138 |
gExpected++; |
| 139 |
var xmlDoc = document.implementation.createDocument(null, null, null); |
139 |
var xmlDoc = document.implementation.createDocument(null, null, null); |
| 140 |
xmlDoc.load('load_cross_origin_xml_document_cors.xml'); |
140 |
xmlDoc.load('load_cross_origin_xml_document_cors.xml'); |
| 141 |
xmlDoc.onload = function(evt) { |
141 |
xmlDoc.onload = function(evt) { |
| 142 |
var content = new XMLSerializer().serializeToString(evt.target); |
142 |
var content = new XMLSerializer().serializeToString(evt.target); |
| 143 |
my_ok(!content.includes('parsererror'), "Load CORS cross origin XML Document should be allowed"); |
143 |
// issue: https://github.com/whatwg/fetch/issues/629 |
|
|
144 |
my_ok(content.includes('parsererror'), "Load CORS cross origin XML Document should not be allowed"); |
| 144 |
finish(); |
145 |
finish(); |
| 145 |
}; |
146 |
}; |
| 146 |
|
147 |
|
| 147 |
gExpected++; |
148 |
gExpected++; |
| 148 |
var xmlDoc = document.implementation.createDocument(null, null, null); |
149 |
var xmlDoc = document.implementation.createDocument(null, null, null); |
| 149 |
xmlDoc.load('load_cross_origin_xml_document_opaque.xml'); |
150 |
xmlDoc.load('load_cross_origin_xml_document_opaque.xml'); |
| 150 |
xmlDoc.onload = function(evt) { |
151 |
xmlDoc.onload = function(evt) { |
| 151 |
var content = new XMLSerializer().serializeToString(evt.target); |
152 |
var content = new XMLSerializer().serializeToString(evt.target); |