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

Unified Diff: test/url_test.dart

Issue 837563005: fixed relative root tests (Closed) Base URL: https://github.com/dart-lang/path.git@master
Patch Set: Created 5 years, 11 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 | « test/posix_test.dart ('k') | test/windows_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/url_test.dart
diff --git a/test/url_test.dart b/test/url_test.dart
index d75377e52807bce1da9ab90a3a2f8952d2c2a165..3f7e6feb215557d6a4aed571edf23cb295a1df14 100644
--- a/test/url_test.dart
+++ b/test/url_test.dart
@@ -639,13 +639,12 @@ main() {
test('from a relative root', () {
var r = new path.Context(style: path.Style.url, current: 'foo/bar');
- expect(context.isWithin('.', 'a/b/c'), isTrue);
- expect(context.isWithin('.', '../a/b/c'), isFalse);
- expect(context.isWithin('.', '../../a/foo/b/c'), isFalse);
- expect(context.isWithin(
- 'http://dartlang.org/', 'http://dartlang.org/baz/bang'),
- isTrue);
- expect(context.isWithin('.', 'http://dartlang.org/baz/bang'), isFalse);
+ expect(r.isWithin('.', 'a/b/c'), isTrue);
+ expect(r.isWithin('.', '../a/b/c'), isFalse);
+ expect(r.isWithin('.', '../../a/foo/b/c'), isFalse);
+ expect(r.isWithin(
+ 'http://dartlang.org/', 'http://dartlang.org/baz/bang'), isTrue);
+ expect(r.isWithin('.', 'http://dartlang.org/baz/bang'), isFalse);
});
});
« no previous file with comments | « test/posix_test.dart ('k') | test/windows_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698