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

Unified Diff: tests/html/resource_http_test.dart

Issue 2272373002: Remove deprecated Resource class from dart:core. (Closed)
Patch Set: Remove a resource test in tests/html Created 4 years, 4 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 | « tests/html/resource_data.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/resource_http_test.dart
diff --git a/tests/html/resource_http_test.dart b/tests/html/resource_http_test.dart
deleted file mode 100644
index 042e8b395b0856b463a8fe9573d8e8548d7ba172..0000000000000000000000000000000000000000
--- a/tests/html/resource_http_test.dart
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library resource_http_test;
-import 'dart:async';
-import 'package:unittest/html_individual_config.dart';
-import 'package:unittest/unittest.dart';
-
-main() {
- useHtmlIndividualConfiguration();
- // Cache blocker is a workaround for:
- // https://code.google.com/p/dart/issues/detail?id=11834
- var cacheBlocker = new DateTime.now().millisecondsSinceEpoch;
- var url = '/root_dart/tests/html/resource_data.txt?cacheBlock=$cacheBlocker';
-
- void validateResponse(data) {
- expect(data, equals('This file was read by a Resource!'));
- }
-
- group('resource', () {
- test('readAsString', () async {
- Resource r = new Resource(url);
- var data = await r.readAsString();
- validateResponse(data);
- });
- test('readAsBytes', () async {
- Resource r = new Resource(url);
- var data = await r.readAsBytes();
- validateResponse(new String.fromCharCodes(data));
- });
- test('openRead', () async {
- Resource r = new Resource(url);
- var bytes = [];
- await for (var b in r.openRead()) {
- bytes.addAll(b);
- }
- validateResponse(new String.fromCharCodes(bytes));
- });
- });
-}
« no previous file with comments | « tests/html/resource_data.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698