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

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

Issue 701413002: Re-land r41544 "Update dart binaries used for running tests to version 1.7.2" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | Annotate | Revision Log
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 'dart:async'; 6 import 'dart:async';
7 import 'dart:convert'; 7 import 'dart:convert';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'dart:typed_data'; 9 import 'dart:typed_data';
10 import 'package:unittest/html_individual_config.dart'; 10 import 'package:unittest/html_individual_config.dart';
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 var json = xhr.response; 241 var json = xhr.response;
242 expect(json, equals(data)); 242 expect(json, equals(data));
243 })); 243 }));
244 }); 244 });
245 }); 245 });
246 246
247 group('headers', () { 247 group('headers', () {
248 test('xhr responseHeaders', () { 248 test('xhr responseHeaders', () {
249 return HttpRequest.request(url).then( 249 return HttpRequest.request(url).then(
250 (xhr) { 250 (xhr) {
251 var serverHeader = xhr.responseHeaders['server']; 251 var contentTypeHeader = xhr.responseHeaders['content-type'];
252 expect(serverHeader, isNotNull); 252 expect(contentTypeHeader, isNotNull);
253 // Should be like: 'Dart/0.1 (dart:io)' 253 // Should be like: 'text/plain; charset=utf-8'
254 expect(serverHeader.startsWith('Dart/'), isTrue); 254 expect(contentTypeHeader.contains('text/plain'), isTrue);
255 expect(contentTypeHeader.contains('charset=utf-8'), isTrue);
255 }); 256 });
256 }); 257 });
257 }); 258 });
258 } 259 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698