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

Unified Diff: tests/html/xhr_test.dart

Issue 12750005: Adding test for XHR responseType 'blob' (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/xhr_test.dart
diff --git a/tests/html/xhr_test.dart b/tests/html/xhr_test.dart
index ed3bd83f8f8c9badddce1473596b1cb75c9bb3d8..8276b49962f0e7ce900614b93a54561a414b4cca 100644
--- a/tests/html/xhr_test.dart
+++ b/tests/html/xhr_test.dart
@@ -142,7 +142,7 @@ main() {
}));
});
- test('XHR.request responseType', () {
+ test('XHR.request responseType arraybuffer', () {
if (ArrayBuffer.supported) {
HttpRequest.request(url, responseType: 'arraybuffer').then(
expectAsync1((xhr) {
@@ -154,6 +154,18 @@ main() {
}
});
+ test('XHR.request responseType blob', () {
+ if (ArrayBuffer.supported) {
+ return HttpRequest.request(url, responseType: 'blob').then(
+ (xhr) {
+ expect(xhr.status, equals(200));
+ var blob = xhr.response;
+ expect(blob is Blob, isTrue);
+ expect(blob, isNotNull);
Anton Muhin 2013/03/14 10:05:01 I think isNotNull check either go first, or be dro
+ });
+ }
+ });
+
test('HttpRequestProgressEvent', () {
var expectation = HttpRequestProgressEvent.supported ?
returnsNormally : throws;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698