Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: sky/tests/services/xhr.sky

Issue 690803002: Add a basic XMLHttpRequest implementation (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: typo Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698