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

Side by Side Diff: tools/testing/dart/browser_controller.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 | « no previous file | tools/testing/dart/http_server.dart » ('j') | 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 library browser; 4 library browser;
5 5
6 import "dart:async"; 6 import "dart:async";
7 import "dart:convert" show LineSplitter, UTF8; 7 import "dart:convert" show LineSplitter, UTF8;
8 import "dart:core"; 8 import "dart:core";
9 import "dart:io"; 9 import "dart:io";
10 10
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 var browserId = request.uri.path.substring(startedPath.length + 1); 1301 var browserId = request.uri.path.substring(startedPath.length + 1);
1302 var testId = 1302 var testId =
1303 int.parse(request.uri.queryParameters["id"].split("=")[1]); 1303 int.parse(request.uri.queryParameters["id"].split("=")[1]);
1304 handleStarted(request, browserId, testId); 1304 handleStarted(request, browserId, testId);
1305 return; 1305 return;
1306 } 1306 }
1307 var textResponse = ""; 1307 var textResponse = "";
1308 if (request.uri.path.startsWith(driverPath)) { 1308 if (request.uri.path.startsWith(driverPath)) {
1309 var browserId = request.uri.path.substring(driverPath.length + 1); 1309 var browserId = request.uri.path.substring(driverPath.length + 1);
1310 textResponse = getDriverPage(browserId); 1310 textResponse = getDriverPage(browserId);
1311 request.response.headers.set('Content-Type', 'text/html');
1311 } else if (request.uri.path.startsWith(nextTestPath)) { 1312 } else if (request.uri.path.startsWith(nextTestPath)) {
1312 var browserId = request.uri.path.substring(nextTestPath.length + 1); 1313 var browserId = request.uri.path.substring(nextTestPath.length + 1);
1313 textResponse = getNextTest(browserId); 1314 textResponse = getNextTest(browserId);
1315 request.response.headers.set('Content-Type', 'text/plain');
1314 } else { 1316 } else {
1315 // /favicon.ico requests 1317 // /favicon.ico requests
1316 } 1318 }
1317 request.response.write(textResponse); 1319 request.response.write(textResponse);
1318 request.listen((_) {}, onDone: request.response.close); 1320 request.listen((_) {}, onDone: request.response.close);
1319 request.response.done.catchError((error) { 1321 request.response.done.catchError((error) {
1320 if (!underTermination) { 1322 if (!underTermination) {
1321 print("URI ${request.uri}"); 1323 print("URI ${request.uri}");
1322 print("Textresponse $textResponse"); 1324 print("Textresponse $textResponse");
1323 throw "Error returning content to browser: $error"; 1325 throw "Error returning content to browser: $error";
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 Dart test driver, number of tests: <div id="number"></div><br> 1604 Dart test driver, number of tests: <div id="number"></div><br>
1603 Currently executing: <div id="currently_executing"></div><br> 1605 Currently executing: <div id="currently_executing"></div><br>
1604 Unhandled error: <div id="unhandled_error"></div> 1606 Unhandled error: <div id="unhandled_error"></div>
1605 <iframe id="embedded_iframe"></iframe> 1607 <iframe id="embedded_iframe"></iframe>
1606 </body> 1608 </body>
1607 </html> 1609 </html>
1608 """; 1610 """;
1609 return driverContent; 1611 return driverContent;
1610 } 1612 }
1611 } 1613 }
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/http_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698