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

Side by Side Diff: pkg/http_server/test/virtual_directory_test.dart

Issue 227133004: Fix long line. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 import "package:http_server/http_server.dart"; 8 import "package:http_server/http_server.dart";
9 import 'package:path/path.dart' as pathos; 9 import 'package:path/path.dart' as pathos;
10 import "package:unittest/unittest.dart"; 10 import "package:unittest/unittest.dart";
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 (s) => s.contains('../')), 159 (s) => s.contains('../')),
160 getAsString(virDir, '/recursive').then( 160 getAsString(virDir, '/recursive').then(
161 (s) => s.contains('Index of /recursive'))]) 161 (s) => s.contains('Index of /recursive'))])
162 .then((result) { 162 .then((result) {
163 expect(result, equals([true, true, true, true, true, true])); 163 expect(result, equals([true, true, true, true, true, true]));
164 }); 164 });
165 }); 165 });
166 166
167 testVirtualDir('encoded-path', (dir) { 167 testVirtualDir('encoded-path', (dir) {
168 var virDir = new VirtualDirectory(dir.path); 168 var virDir = new VirtualDirectory(dir.path);
169 new Directory('${dir.path}/javascript:alert(document);"').createSync() ; 169 new Directory('${dir.path}/javascript:alert(document);"')
170 .createSync();
170 virDir.allowDirectoryListing = true; 171 virDir.allowDirectoryListing = true;
171 172
172 return getAsString(virDir, '/') 173 return getAsString(virDir, '/')
173 .then((result) { 174 .then((result) {
174 expect(result, contains('%2Fjavascript%3Aalert(document)%3B%22')); 175 expect(result, contains('%2Fjavascript%3Aalert(document)%3B%22'));
175 }); 176 });
176 }); 177 });
177 178
178 testVirtualDir('encoded-special', (dir) { 179 testVirtualDir('encoded-special', (dir) {
179 var virDir = new VirtualDirectory(dir.path); 180 var virDir = new VirtualDirectory(dir.path);
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 return virDir.serveFile(new File('${d.path}/file'), request); 565 return virDir.serveFile(new File('${d.path}/file'), request);
565 }; 566 };
566 567
567 return getAsString(virDir, '/') 568 return getAsString(virDir, '/')
568 .then((result) { 569 .then((result) {
569 expect(result, 'file contents'); 570 expect(result, 'file contents');
570 }); 571 });
571 }); 572 });
572 }); 573 });
573 } 574 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698