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

Unified Diff: sky/tests/framework/xmlhttprequest/empty-responseType.sky

Issue 805503002: Add responseType='arraybuffer' support to XHR (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Updated per ojan's review 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 side-by-side diff with in-line comments
Download patch
Index: sky/tests/framework/xmlhttprequest/empty-responseType.sky
diff --git a/sky/tests/framework/xmlhttprequest/empty-responseType.sky b/sky/tests/framework/xmlhttprequest/empty-responseType.sky
new file mode 100644
index 0000000000000000000000000000000000000000..19a132b55124b65e9673012491119b06bbfd8278
--- /dev/null
+++ b/sky/tests/framework/xmlhttprequest/empty-responseType.sky
@@ -0,0 +1,23 @@
+<sky>
+<import src="/sky/tests/resources/chai.sky" />
+<import src="/sky/tests/resources/mocha.sky" />
+<import src="/sky/framework/xmlhttprequest.sky" as="XMLHttpRequest" />
+<script>
+describe("xmlhttprequest.responseType", function() {
+ this.enableTimeouts(false);
+
+ it("should default to text when empty", function() {
+ var xhr = new XMLHttpRequest();
+ assert.equal(xhr.responseType, "");
+ xhr.responseType = 'foo';
+ xhr.responseType = '';
+ xhr.onload = function() {
+ assert.typeOf(this.response, "string", "Response is a string\n");
+ done();
+ };
+ xhr.open("GET", "resources/pass.txt");
+ xhr.send();
+ });
+});
+</script>
+</sky>
« no previous file with comments | « sky/framework/xmlhttprequest.sky ('k') | sky/tests/framework/xmlhttprequest/empty-responseType-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698