Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <html> | |
| 2 xxx | |
|
esprehn
2014/10/29 19:39:46
huh?
abarth-chromium
2014/10/29 19:47:55
Removed.
| |
| 3 <link rel="import" href="../resources/chai.sky" /> | |
| 4 <link rel="import" href="../resources/mocha.sky" /> | |
| 5 <link rel="import" href="/sky/framework/xmlhttprequest.sky" as="XMLHttpRequest" /> | |
| 6 <script> | |
| 7 describe('XMLHttpRequest', function() { | |
| 8 this.enableTimeouts(false); | |
| 9 | |
| 10 it('should be able to fetch text files', function(done) { | |
| 11 | |
| 12 var xhr = new XMLHttpRequest(); | |
| 13 xhr.onload = function() { | |
| 14 console.log("onload+xxx: " + xhr.responseText) | |
| 15 assert.equal(xhr.responseText, "This is data from the network.\n"); | |
| 16 done(); | |
| 17 }; | |
| 18 xhr.onerror = function() { | |
|
esprehn
2014/10/29 19:39:46
error
| |
| 19 assert.ok(false, "Got error event."); | |
| 20 done(); | |
| 21 }; | |
| 22 xhr.open("GET", "http://127.0.0.1:8000/services/resources/pass.txt"); | |
| 23 xhr.send(); | |
| 24 }); | |
| 25 }); | |
| 26 </script> | |
| 27 </html> | |
| OLD | NEW |