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

Side by Side Diff: tools/testing/dart/http_server.dart

Issue 483353003: Update test scripts to run under the Dart 1.6 vm. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/testing/dart/browser_controller.dart ('k') | 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 library http_server; 5 library http_server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'dart:convert' show 10 import 'dart:convert' show
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 response.headers.set("X-WebKit-CSP", content_header_value); 359 response.headers.set("X-WebKit-CSP", content_header_value);
360 } 360 }
361 } 361 }
362 if (path.filename.endsWith('.html')) { 362 if (path.filename.endsWith('.html')) {
363 response.headers.set('Content-Type', 'text/html'); 363 response.headers.set('Content-Type', 'text/html');
364 } else if (path.filename.endsWith('.js')) { 364 } else if (path.filename.endsWith('.js')) {
365 response.headers.set('Content-Type', 'application/javascript'); 365 response.headers.set('Content-Type', 'application/javascript');
366 } else if (path.filename.endsWith('.dart')) { 366 } else if (path.filename.endsWith('.dart')) {
367 response.headers.set('Content-Type', 'application/dart'); 367 response.headers.set('Content-Type', 'application/dart');
368 } 368 }
369 response.headers.removeAll("X-Frame-Options");
369 file.openRead().pipe(response).catchError((e) { 370 file.openRead().pipe(response).catchError((e) {
370 DebugLogger.warning( 371 DebugLogger.warning(
371 'HttpServer: error while closing the response stream', e); 372 'HttpServer: error while closing the response stream', e);
372 }); 373 });
373 } 374 }
374 375
375 void _sendNotFound(HttpRequest request, HttpResponse response) { 376 void _sendNotFound(HttpRequest request, HttpResponse response) {
376 bool isHarmlessPath(String path) { 377 bool isHarmlessPath(String path) {
377 return _HARMLESS_REQUEST_PATH_ENDINGS.any((ending) { 378 return _HARMLESS_REQUEST_PATH_ENDINGS.any((ending) {
378 return path.endsWith(ending); 379 return path.endsWith(ending);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 class _Entry implements Comparable { 416 class _Entry implements Comparable {
416 final String name; 417 final String name;
417 final String displayName; 418 final String displayName;
418 419
419 _Entry(this.name, this.displayName); 420 _Entry(this.name, this.displayName);
420 421
421 int compareTo(_Entry other) { 422 int compareTo(_Entry other) {
422 return name.compareTo(other.name); 423 return name.compareTo(other.name);
423 } 424 }
424 } 425 }
OLDNEW
« no previous file with comments | « tools/testing/dart/browser_controller.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698