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

Side by Side Diff: tools/testing/dart/test_controller.js

Issue 148913003: Improve how we handle packages/ HTML imports. This resolves better any valid (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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
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 /* 5 /*
6 * The communication protocol between test_controller.js and the driving 6 * The communication protocol between test_controller.js and the driving
7 * page are JSON encoded messages of the following form: 7 * page are JSON encoded messages of the following form:
8 * message = { 8 * message = {
9 * is_first_message: true/false, 9 * is_first_message: true/false,
10 * is_status_update: true/false, 10 * is_status_update: true/false,
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 recordEvent('window_compilationerror', 227 recordEvent('window_compilationerror',
228 'DOMContentLoaded event: window.compilationError = ' + 228 'DOMContentLoaded event: window.compilationError = ' +
229 calledwindow.compilationError); 229 calledwindow.compilationError);
230 notifyDone('FAIL'); 230 notifyDone('FAIL');
231 } 231 }
232 } 232 }
233 233
234 window.addEventListener('DOMContentLoaded', onLoad, false); 234 window.addEventListener('DOMContentLoaded', onLoad, false);
235 235
236 // Note: before renaming this function, note that it is also included in an 236 // Note: before renaming this function, note that it is also included in an
237 // inlined error handler in the HTML files that wrap DRT tests. 237 // inlined error handler in the HTML files that wrap DRT tests, and manually in
kustermann 2014/01/30 01:41:34 "in the HTML files that wrap DRT tests" -> "in the
Siggi Cherem (dart-lang) 2014/01/30 02:25:00 Done.
238 // tests that include an HTML file.
238 // See: tools/testing/dart/browser_test.dart 239 // See: tools/testing/dart/browser_test.dart
239 function scriptTagOnErrorCallback(e) { 240 function scriptTagOnErrorCallback(e) {
240 var message = e && e.message; 241 var message = e && e.message;
241 recordEvent('script_onerror', 'script.onError called: ' + message); 242 recordEvent('script_onerror', 'script.onError called: ' + message);
242 notifyDone('FAIL'); 243 notifyDone('FAIL');
243 } 244 }
244 245
245 // dart2js will generate code to call this function to handle the Dart 246 // dart2js will generate code to call this function to handle the Dart
246 // [print] method. 247 // [print] method.
247 // 248 //
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 dartPrint('dart-calling-main'); 286 dartPrint('dart-calling-main');
286 try { 287 try {
287 main(); 288 main();
288 } catch (e) { 289 } catch (e) {
289 recordEvent('sync_exception', 'Exception: ' + e + '\nStack: ' + e.stack); 290 recordEvent('sync_exception', 'Exception: ' + e + '\nStack: ' + e.stack);
290 notifyDone('FAIL'); 291 notifyDone('FAIL');
291 return; 292 return;
292 } 293 }
293 dartPrint('dart-main-done'); 294 dartPrint('dart-main-done');
294 } 295 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698