OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../js/resources/js-test-pre.js"></script> | 3 <script src="../js/resources/js-test-pre.js"></script> |
4 <script> | 4 <script> |
5 description('This tests the XMLHttpRequest responseXML loading an HTML d
ocument in Quirks Mode with responseType "document".'); | 5 description('This tests the XMLHttpRequest responseXML loading an HTML d
ocument in Quirks Mode with responseType "document".'); |
6 | 6 |
7 window.jsTestIsAsync = true; | 7 window.jsTestIsAsync = true; |
8 var xhr = new XMLHttpRequest(), | 8 var xhr = new XMLHttpRequest(), |
9 url = window.location.href, | 9 url = window.location.href, |
10 children; | 10 children; |
(...skipping 30 matching lines...) Expand all Loading... |
41 finishJSTest(); | 41 finishJSTest(); |
42 }; | 42 }; |
43 xhr.onerror = function() { | 43 xhr.onerror = function() { |
44 testFailed('The XHR request to an existing resource failed: "' + url
+ '"'); | 44 testFailed('The XHR request to an existing resource failed: "' + url
+ '"'); |
45 finishJSTest(); | 45 finishJSTest(); |
46 }; | 46 }; |
47 xhr.open('GET', url); | 47 xhr.open('GET', url); |
48 xhr.responseType = 'document'; | 48 xhr.responseType = 'document'; |
49 xhr.send(null); | 49 xhr.send(null); |
50 </script> | 50 </script> |
51 <script src="../js/resources/js-test-post.js"></script> | |
52 </head> | 51 </head> |
53 <body> | 52 <body> |
54 <div id="description"></div> | 53 <div id="description"></div> |
55 | 54 |
56 <!-- Leave these break tags malformed/open to test HTML parsing. | 55 <!-- Leave these break tags malformed/open to test HTML parsing. |
57 They should be siblings to div#description, and not nested within one a
nother. | 56 They should be siblings to div#description, and not nested within one a
nother. |
58 The XMLDocument parser would treat the second <br> as a child to the fi
rst. --> | 57 The XMLDocument parser would treat the second <br> as a child to the fi
rst. --> |
59 <br><br> | 58 <br><br> |
60 | 59 |
61 <div id="console"></div> | 60 <div id="console"></div> |
62 | 61 |
63 <script> | 62 <script> |
64 // This code will manipulate the first BR node by adding an "id" to it. | 63 // This code will manipulate the first BR node by adding an "id" to it. |
65 // This same BR will be inspected after XHR loads the document to see | 64 // This same BR will be inspected after XHR loads the document to see |
66 // if this script executed or not. If it didn't execute, the first BR | 65 // if this script executed or not. If it didn't execute, the first BR |
67 // will not have an "id" specified and the test passes. | 66 // will not have an "id" specified and the test passes. |
68 var br = document.querySelector('div#description + br'); | 67 var br = document.querySelector('div#description + br'); |
69 br.id = 'break-tag'; | 68 br.id = 'break-tag'; |
70 </script> | 69 </script> |
71 </body> | 70 </body> |
72 </html> | 71 </html> |
OLD | NEW |