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

Side by Side Diff: dart/pkg/http_base/test/http_base_html_test.dart

Issue 495533003: Remove obsolete http_base package (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | « dart/pkg/http_base/pubspec.yaml ('k') | dart/pkg/http_base/test/http_base_io_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
(Empty)
1 library http_base.http_base_html_test;
2
3 import 'dart:html';
4 import 'dart:async';
5 import 'dart:convert';
6
7 import 'package:http_base/http_base_html.dart';
8 import 'package:unittest/unittest.dart';
9
10 main() {
11 test('http-client', () {
12 var uri = Uri.parse(window.location.href).resolve('/echo');
13
14 var client = new Client();
15 var body = (new StreamController()
16 ..add(UTF8.encode('my-data'))
17 ..close()).stream;
18 var request = new RequestImpl('POST', uri, body: body);
19 client(request).then(expectAsync((response) {
20 expect(response.statusCode, equals(200));
21 response.read()
22 .transform(UTF8.decoder).join('').then(expectAsync((data) {
23 expect(data, equals('my-data'));
24 }));
25 }));
26 });
27 }
OLDNEW
« no previous file with comments | « dart/pkg/http_base/pubspec.yaml ('k') | dart/pkg/http_base/test/http_base_io_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698