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

Unified Diff: tools/testing/dart/http_server.dart

Issue 12817003: Change getRange to sublist. Make getRange deprecated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 7 years, 9 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
Index: tools/testing/dart/http_server.dart
diff --git a/tools/testing/dart/http_server.dart b/tools/testing/dart/http_server.dart
index d065e0bcaac33f64a9dda61127ccee40c4d58c7f..b555c4ac1b8635a1a8188ae897ac9ea2887e2490 100644
--- a/tools/testing/dart/http_server.dart
+++ b/tools/testing/dart/http_server.dart
@@ -189,20 +189,18 @@ class TestingServers {
if (pathSegments[0] == PREFIX_BUILDDIR) {
basePath = _buildDirectory;
relativePath = new Path(
- pathSegments.getRange(1, pathSegments.length - 1).join('/'));
+ pathSegments.skip(1).join('/'));
} else if (pathSegments[0] == PREFIX_DARTDIR) {
basePath = TestUtils.dartDir();
relativePath = new Path(
- pathSegments.getRange(1, pathSegments.length - 1).join('/'));
+ pathSegments.skip(1).join('/'));
}
var packagesDirName = 'packages';
var packagesIndex = pathSegments.indexOf(packagesDirName);
if (packagesIndex != -1) {
var start = packagesIndex + 1;
- var length = pathSegments.length - start;
basePath = _buildDirectory.append(packagesDirName);
- relativePath = new Path(
- pathSegments.getRange(start, length).join('/'));
+ relativePath = new Path(pathSegments.skip(start).join('/'));
}
if (basePath != null && relativePath != null) {
return basePath.join(relativePath);

Powered by Google App Engine
This is Rietveld 408576698