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

Side by Side Diff: sky/tests/framework/xmlhttprequest/xhr-does-not-exist.sky

Issue 808663002: Revert "Add POST support to XHR as well as .status and statusText support" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 <sky>
2 <import src="/sky/tests/resources/chai.sky" />
3 <import src="/sky/tests/resources/mocha.sky" />
4 <import src="/sky/framework/xmlhttprequest.sky" as="XMLHttpRequest" />
5 <script>
6 describe("xmlhttprequest", function() {
7 it("should call onerror when endpoint does not exist", function(done) {
8 var xhr = new XMLHttpRequest();
9 xhr.open("GET", "does_not_exist.html");
10 xhr.onerror = function() {
11 assert.fail("onload", "onerror", "onerror should not be called.");
12 done();
13 }
14 xhr.onload = function() {
15 // Missing files are application-level errors, not network errors
16 // so onload fires, not onerror.
17 assert.equal(xhr.status, 404);
18 assert.equal(xhr.statusText, "HTTP/1.1 404 Not Found",
19 "status text should also be 404");
20 done();
21 }
22 xhr.send();
23 });
24 });
25 </script>
26 </sky>
OLDNEW
« no previous file with comments | « sky/tests/framework/xmlhttprequest/xhr.sky ('k') | sky/tests/framework/xmlhttprequest/xhr-does-not-exist-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698