Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 142 // DOM output of content shell. | 142 // DOM output of content shell. |
| 143 printToDOM(testOutcome); | 143 printToDOM(testOutcome); |
| 144 } else { | 144 } else { |
| 145 printToConsole('Test outcome: ' + testOutcome); | 145 printToConsole('Test outcome: ' + testOutcome); |
| 146 } | 146 } |
| 147 } else if (usingBrowserController()) { | 147 } else if (usingBrowserController()) { |
| 148 // To support in browser launching of tests we post back start and result | 148 // To support in browser launching of tests we post back start and result |
| 149 // messages to the window.opener. | 149 // messages to the window.opener. |
| 150 var driver = getDriverWindow(); | 150 var driver = getDriverWindow(); |
| 151 | 151 |
| 152 if (isDone) { | |
| 153 recordEvent('debug', 'Sending onDone event to driver.'); | |
|
kustermann
2013/11/29 08:17:56
Rename to 'Sending events to driver page.'
(why d
ricow1
2013/11/29 08:21:52
So this should have been isDone, I only do this if
kustermann
2013/11/29 08:26:23
Sorry about that, please remove the 'if (isDone) {
| |
| 154 } | |
| 152 // Post the DOM and all events that happened. | 155 // Post the DOM and all events that happened. |
| 153 var events = recordedEventList.slice(0); | 156 var events = recordedEventList.slice(0); |
| 154 events.push(buildDomEvent()); | 157 events.push(buildDomEvent()); |
| 155 | 158 |
| 156 var message = JSON.stringify(events); | 159 var message = JSON.stringify(events); |
| 157 driver.postMessage( | 160 driver.postMessage( |
| 158 JSON.stringify({ | 161 JSON.stringify({ |
| 159 message: message, | 162 message: message, |
| 160 is_first_message: isFirstMessage, | 163 is_first_message: isFirstMessage, |
| 161 is_status_update: isStatusUpdate, | 164 is_status_update: isStatusUpdate, |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 282 dartPrint('dart-calling-main'); | 285 dartPrint('dart-calling-main'); |
| 283 try { | 286 try { |
| 284 main(); | 287 main(); |
| 285 } catch (e) { | 288 } catch (e) { |
| 286 recordEvent('sync_exception', 'Exception: ' + e + '\nStack: ' + e.stack); | 289 recordEvent('sync_exception', 'Exception: ' + e + '\nStack: ' + e.stack); |
| 287 notifyDone('FAIL'); | 290 notifyDone('FAIL'); |
| 288 return; | 291 return; |
| 289 } | 292 } |
| 290 dartPrint('dart-main-done'); | 293 dartPrint('dart-main-done'); |
| 291 } | 294 } |
| OLD | NEW |