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

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

Issue 2841543002: Spelling a (Closed)
Patch Set: Created 3 years, 7 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
« 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 /* 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // 274 //
275 // Our tests will be wrapped, so we can detect when [main] is called and when 275 // Our tests will be wrapped, so we can detect when [main] is called and when
276 // it has ended. 276 // it has ended.
277 // The wrapping happens either via "dartMainRunner" (for dart2js) or wrapped 277 // The wrapping happens either via "dartMainRunner" (for dart2js) or wrapped
278 // tests for dartium. 278 // tests for dartium.
279 // 279 //
280 // The following messages are handled specially: 280 // The following messages are handled specially:
281 // dart-calling-main: signals that the dart [main] function will be invoked 281 // dart-calling-main: signals that the dart [main] function will be invoked
282 // dart-main-done: signals that the dart [main] function has finished 282 // dart-main-done: signals that the dart [main] function has finished
283 // unittest-suite-wait-for-done: signals the start of an asynchronous test 283 // unittest-suite-wait-for-done: signals the start of an asynchronous test
284 // unittest-suite-success: signals the end of an asynchrounous test 284 // unittest-suite-success: signals the end of an asynchronous test
285 // unittest-suite-fail: signals that the asynchronous test failed 285 // unittest-suite-fail: signals that the asynchronous test failed
286 // unittest-suite-done: signals the end of an asynchronous test, the outcome 286 // unittest-suite-done: signals the end of an asynchronous test, the outcome
287 // is unknown 287 // is unknown
288 // 288 //
289 // These messages are used to communicate with the test and will be posted so 289 // These messages are used to communicate with the test and will be posted so
290 // [processMessage] above can see it. 290 // [processMessage] above can see it.
291 function dartPrint(message) { 291 function dartPrint(message) {
292 recordEvent('print', message); 292 recordEvent('print', message);
293 if ((message === 'unittest-suite-wait-for-done') || 293 if ((message === 'unittest-suite-wait-for-done') ||
294 (message === 'unittest-suite-success') || 294 (message === 'unittest-suite-success') ||
(...skipping 14 matching lines...) Expand all
309 dartPrint('dart-calling-main'); 309 dartPrint('dart-calling-main');
310 try { 310 try {
311 main(); 311 main();
312 } catch (e) { 312 } catch (e) {
313 recordEvent('sync_exception', 'Exception: ' + e + '\nStack: ' + e.stack); 313 recordEvent('sync_exception', 'Exception: ' + e + '\nStack: ' + e.stack);
314 notifyDone('FAIL'); 314 notifyDone('FAIL');
315 return; 315 return;
316 } 316 }
317 dartPrint('dart-main-done'); 317 dartPrint('dart-main-done');
318 } 318 }
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