| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../js/resources/js-test-pre.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 if ('internals' in window) { | 6 if ('internals' in window) { |
| 7 window.internals.settings.setSyncXHRInDocumentsEnabled(false); | 7 window.internals.settings.setSyncXHRInDocumentsEnabled(false); |
| 8 } else { | 8 } else { |
| 9 document.write('This test depends on the syncXHRInDocumentsEnabled s
etting being false, so run in DumpRenderTree or manually enable it'); | 9 document.write('This test depends on the syncXHRInDocumentsEnabled s
etting being false, so run in DumpRenderTree or manually enable it'); |
| 10 } | 10 } |
| 11 | 11 |
| 12 description('This tests that synchronous XMLHttpRequests fail when they
are disabled for documents.'); | 12 description('This tests that synchronous XMLHttpRequests fail when they
are disabled for documents.'); |
| 13 var xhr = new XMLHttpRequest(); | 13 var xhr = new XMLHttpRequest(); |
| 14 shouldThrow('xhr.open("GET", "http://mydomain/", false)'); | 14 shouldThrow('xhr.open("GET", "http://mydomain/", false)'); |
| 15 </script> | 15 </script> |
| 16 </head> | 16 </head> |
| 17 <body> | 17 <body> |
| 18 <div id="description"></div> | 18 <div id="description"></div> |
| 19 <div id="console"></div> | 19 <div id="console"></div> |
| 20 </body> | 20 </body> |
| 21 </html> | 21 </html> |
| OLD | NEW |