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

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

Issue 231413003: using unittest via package import (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nits Created 6 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/worker_test.dart ('k') | tests/html/xsltprocessor_test.dart » ('j') | 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 XHRCrossOriginTest; 5 library XHRCrossOriginTest;
6 import '../../pkg/unittest/lib/unittest.dart'; 6 import 'package:unittest/unittest.dart';
7 import '../../pkg/unittest/lib/html_individual_config.dart'; 7 import 'package:unittest/html_individual_config.dart';
8 import 'dart:html'; 8 import 'dart:html';
9 import "dart:convert"; 9 import "dart:convert";
10 10
11 /** 11 /**
12 * Examine the value of "crossOriginPort" as passed in from the url from 12 * Examine the value of "crossOriginPort" as passed in from the url from
13 * [window.location] to determine what the cross-origin port is for 13 * [window.location] to determine what the cross-origin port is for
14 * this test. 14 * this test.
15 */ 15 */
16 // TODO(efortuna): If we need to use this function frequently, make a 16 // TODO(efortuna): If we need to use this function frequently, make a
17 // url_analyzer library that is part of test.dart that these tests can import. 17 // url_analyzer library that is part of test.dart that these tests can import.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 var url = '$host/root_dart/tests/html/xhr_cross_origin_data.txt'; 101 var url = '$host/root_dart/tests/html/xhr_cross_origin_data.txt';
102 return HttpRequest.request(url, withCredentials: true).then((xhr) { 102 return HttpRequest.request(url, withCredentials: true).then((xhr) {
103 var data = JSON.decode(xhr.response); 103 var data = JSON.decode(xhr.response);
104 expect(data, contains('feed')); 104 expect(data, contains('feed'));
105 expect(data['feed'], contains('entry')); 105 expect(data['feed'], contains('entry'));
106 expect(data, isMap); 106 expect(data, isMap);
107 }); 107 });
108 }); 108 });
109 }); 109 });
110 } 110 }
OLDNEW
« no previous file with comments | « tests/html/worker_test.dart ('k') | tests/html/xsltprocessor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698