| OLD | NEW |
| 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 if (navigator.webkitStartDart) { |
| 11 navigator.webkitStartDart(); |
| 12 } |
| 13 |
| 10 function processMessage(msg) { | 14 function processMessage(msg) { |
| 11 if (window.layoutTestController) { | 15 if (window.layoutTestController) { |
| 12 if (msg == 'unittest-suite-done') { | 16 if (msg == 'unittest-suite-done') { |
| 13 window.layoutTestController.notifyDone(); | 17 window.layoutTestController.notifyDone(); |
| 14 } else if (msg == 'unittest-suite-wait-for-done') { | 18 } else if (msg == 'unittest-suite-wait-for-done') { |
| 15 window.layoutTestController.startedDartTest = true; | 19 window.layoutTestController.startedDartTest = true; |
| 16 } | 20 } |
| 17 } | 21 } |
| 18 } | 22 } |
| 19 | 23 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 32 if (window.compilationError) { | 36 if (window.compilationError) { |
| 33 var element = document.createElement('pre'); | 37 var element = document.createElement('pre'); |
| 34 element.innerHTML = window.compilationError; | 38 element.innerHTML = window.compilationError; |
| 35 document.body.appendChild(element); | 39 document.body.appendChild(element); |
| 36 window.layoutTestController.notifyDone(); | 40 window.layoutTestController.notifyDone(); |
| 37 return; | 41 return; |
| 38 } | 42 } |
| 39 } | 43 } |
| 40 | 44 |
| 41 window.addEventListener("DOMContentLoaded", onLoad, false); | 45 window.addEventListener("DOMContentLoaded", onLoad, false); |
| OLD | NEW |