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

Side by Side Diff: client/testing/unittest/test_controller.js

Issue 8430005: Tell the testing-framework that we started the tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 9 years, 1 month 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 | client/testing/unittest/unittest.dart » ('j') | tools/testing/architecture.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 * Test controller logic - used by unit test harness to embed tests in 6 * Test controller logic - used by unit test harness to embed tests in
7 * DumpRenderTree. 7 * DumpRenderTree.
8 */ 8 */
9 9
10 function processMessage(msg) { 10 function processMessage(msg) {
11 if (window.layoutTestController) { 11 if (window.layoutTestController) {
12 if (msg == 'unittest-suite-done') { 12 if (msg == 'unittest-suite-done') {
13 window.layoutTestController.notifyDone(); 13 window.layoutTestController.notifyDone();
14 } else if (msg == 'unittest-suite-start') { 14 } else if (msg == 'unittest-suite-wait-for-done') {
15 window.layoutTestController.startedDartTest = true; 15 window.layoutTestController.startedDartTest = true;
16 } 16 }
17 } 17 }
18 } 18 }
19 19
20 function onReceive(e) { 20 function onReceive(e) {
21 processMessage(e.data); 21 processMessage(e.data);
22 } 22 }
23 23
24 if (window.layoutTestController) { 24 if (window.layoutTestController) {
25 window.layoutTestController.dumpAsText(); 25 window.layoutTestController.dumpAsText();
26 window.layoutTestController.waitUntilDone(); 26 window.layoutTestController.waitUntilDone();
27 } 27 }
28 window.addEventListener("message", onReceive, false); 28 window.addEventListener("message", onReceive, false);
29 29
30 function onLoad(e) { 30 function onLoad(e) {
31 // needed for dartium compilation errors. 31 // needed for dartium compilation errors.
32 if (window.compilationError) { 32 if (window.compilationError) {
33 var element = document.createElement('pre'); 33 var element = document.createElement('pre');
34 element.innerHTML = window.compilationError; 34 element.innerHTML = window.compilationError;
35 document.body.appendChild(element); 35 document.body.appendChild(element);
36 window.layoutTestController.notifyDone(); 36 window.layoutTestController.notifyDone();
37 return; 37 return;
38 } 38 }
39 } 39 }
40 40
41 window.addEventListener("DOMContentLoaded", onLoad, false); 41 window.addEventListener("DOMContentLoaded", onLoad, false);
OLDNEW
« no previous file with comments | « no previous file | client/testing/unittest/unittest.dart » ('j') | tools/testing/architecture.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698