| 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 library browser; | 4 library browser; |
| 5 | 5 |
| 6 import "dart:async"; | 6 import "dart:async"; |
| 7 import "dart:convert" show UTF8, JSON; | 7 import "dart:convert" show UTF8, JSON; |
| 8 import "dart:core"; | 8 import "dart:core"; |
| 9 import "dart:io"; | 9 import "dart:io"; |
| 10 import "dart:math" show min; | 10 import "dart:math" show min; |
| (...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1798 } | 1798 } |
| 1799 } | 1799 } |
| 1800 reportMessage(message, isFirstMessage, isStatusUpdate); | 1800 reportMessage(message, isFirstMessage, isStatusUpdate); |
| 1801 } | 1801 } |
| 1802 } | 1802 } |
| 1803 } | 1803 } |
| 1804 | 1804 |
| 1805 function sendStatusUpdate () { | 1805 function sendStatusUpdate () { |
| 1806 var dom = | 1806 var dom = |
| 1807 embedded_iframe.contentWindow.document.documentElement.innerHTML; | 1807 embedded_iframe.contentWindow.document.documentElement.innerHTML; |
| 1808 reportMessage('Status:\\n Messages received multiple times:\\n ' + | 1808 var message = 'Status:\\n'; |
| 1809 html_test.double_received_messages + | 1809 if (html_test != null) { |
| 1810 '\\n Unexpected messages:\\n ' + | 1810 message += |
| 1811 html_test.unexpected_messages + | 1811 ' Messages received multiple times:\\n' + |
| 1812 '\\n DOM:\\n ' + dom, false, true); | 1812 ' ' + html_test.double_received_messages + '\\n' + |
| 1813 ' Unexpected messages:\\n' + |
| 1814 ' ' + html_test.unexpected_messages + '\\n'; |
| 1815 } |
| 1816 message += ' DOM:\\n' + |
| 1817 ' ' + dom; |
| 1818 reportMessage(message, false, true); |
| 1813 } | 1819 } |
| 1814 | 1820 |
| 1815 function sendRepeatingStatusUpdate() { | 1821 function sendRepeatingStatusUpdate() { |
| 1816 sendStatusUpdate(); | 1822 sendStatusUpdate(); |
| 1817 setTimeout(sendRepeatingStatusUpdate, STATUS_UPDATE_INTERVAL); | 1823 setTimeout(sendRepeatingStatusUpdate, STATUS_UPDATE_INTERVAL); |
| 1818 } | 1824 } |
| 1819 | 1825 |
| 1820 // HTML tests post messages to their own window, handled by this handler. | 1826 // HTML tests post messages to their own window, handled by this handler. |
| 1821 // This handler is installed on the child window when it sends the | 1827 // This handler is installed on the child window when it sends the |
| 1822 // 'detect_errors' event. Every HTML test must send 'detect_errors' to | 1828 // 'detect_errors' event. Every HTML test must send 'detect_errors' to |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1871 </div> | 1877 </div> |
| 1872 <div id="embedded_iframe_div" class="test box"> | 1878 <div id="embedded_iframe_div" class="test box"> |
| 1873 <iframe id="embedded_iframe"></iframe> | 1879 <iframe id="embedded_iframe"></iframe> |
| 1874 </div> | 1880 </div> |
| 1875 </body> | 1881 </body> |
| 1876 </html> | 1882 </html> |
| 1877 """; | 1883 """; |
| 1878 return driverContent; | 1884 return driverContent; |
| 1879 } | 1885 } |
| 1880 } | 1886 } |
| OLD | NEW |