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

Unified Diff: pkg/http_server/test/virtual_directory_test.dart

Issue 370753002: Fix links of VirtualDirectory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | « pkg/http_server/pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http_server/test/virtual_directory_test.dart
diff --git a/pkg/http_server/test/virtual_directory_test.dart b/pkg/http_server/test/virtual_directory_test.dart
index 81e0071894b3b10f202c52460a2d5c88e79b9e09..b95abdc2878ab694e8cd29640a51d6b19c790a0f 100644
--- a/pkg/http_server/test/virtual_directory_test.dart
+++ b/pkg/http_server/test/virtual_directory_test.dart
@@ -116,6 +116,17 @@ void main() {
});
});
+ testVirtualDir('dir-href', (dir) {
+ var virDir = new VirtualDirectory(dir.path);
+ new Directory('${dir.path}/dir').createSync();
+ virDir.allowDirectoryListing = true;
+
+ return getAsString(virDir, '/')
+ .then((result) {
+ expect(result, contains('<a href="dir/">'));
+ });
+ });
+
testVirtualDir('dirs', (dir) {
var virDir = new VirtualDirectory(dir.path);
for (int i = 0; i < 10; i++) {
@@ -194,7 +205,7 @@ void main() {
return getAsString(virDir, '/')
.then((result) {
- expect(result, contains('%2Fjavascript%3Aalert(document)%3B%22'));
+ expect(result, contains('javascript%3Aalert(document)%3B%22/'));
});
});
@@ -206,7 +217,7 @@ void main() {
return getAsString(virDir, '/')
.then((result) {
expect(result, contains('&lt;&gt;&amp;&quot;&#x2F;'));
- expect(result, contains('href="%2F%3C%3E%26%22"'));
+ expect(result, contains('href="%3C%3E%26%22/"'));
});
});
}
« no previous file with comments | « pkg/http_server/pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698