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

Side by Side Diff: tests/html/xhr_test.dart

Issue 13845015: Update tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/html/url_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library XHRTest; 5 library XHRTest;
6 import '../../pkg/unittest/lib/unittest.dart'; 6 import '../../pkg/unittest/lib/unittest.dart';
7 import '../../pkg/unittest/lib/html_individual_config.dart'; 7 import '../../pkg/unittest/lib/html_individual_config.dart';
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:html'; 9 import 'dart:html';
10 import 'dart:json' as json; 10 import 'dart:json' as json;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 test('XHR.getString No file', () { 138 test('XHR.getString No file', () {
139 HttpRequest.getString('NonExistingFile').then( 139 HttpRequest.getString('NonExistingFile').then(
140 (_) { fail('Succeeded for non-existing file.'); }, 140 (_) { fail('Succeeded for non-existing file.'); },
141 onError: expectAsync1((e) { 141 onError: expectAsync1((e) {
142 validate404(e.error.target); 142 validate404(e.error.target);
143 })); 143 }));
144 }); 144 });
145 145
146 test('XHR.request responseType bytebuffer', () { 146 test('XHR.request responseType bytebuffer', () {
147 if (ByteBuffer.supported) { 147 if (ByteBuffer.supported) {
148 HttpRequest.request(url, responseType: 'bytebuffer').then( 148 HttpRequest.request(url, responseType: 'arraybuffer').then(
149 expectAsync1((xhr) { 149 expectAsync1((xhr) {
150 expect(xhr.status, equals(200)); 150 expect(xhr.status, equals(200));
151 var byteBuffer = xhr.response; 151 var byteBuffer = xhr.response;
152 expect(byteBuffer, new isInstanceOf<ByteBuffer>()); 152 expect(byteBuffer, new isInstanceOf<ByteBuffer>());
153 expect(byteBuffer, isNotNull); 153 expect(byteBuffer, isNotNull);
154 })); 154 }));
155 } 155 }
156 }); 156 });
157 157
158 test('HttpRequestProgressEvent', () { 158 test('HttpRequestProgressEvent', () {
(...skipping 13 matching lines...) Expand all
172 (xhr) { 172 (xhr) {
173 expect(xhr.status, equals(200)); 173 expect(xhr.status, equals(200));
174 var blob = xhr.response; 174 var blob = xhr.response;
175 expect(blob is Blob, isTrue); 175 expect(blob is Blob, isTrue);
176 expect(blob, isNotNull); 176 expect(blob, isNotNull);
177 }); 177 });
178 } 178 }
179 }); 179 });
180 }); 180 });
181 } 181 }
OLDNEW
« no previous file with comments | « tests/html/url_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698