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 LineSplitter, UTF8, JSON; | 7 import "dart:convert" show LineSplitter, UTF8, JSON; |
8 import "dart:core"; | 8 import "dart:core"; |
9 import "dart:io"; | 9 import "dart:io"; |
10 import "dart:math" show max, min; | 10 import "dart:math" show max, min; |
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 timedOut.add(status.currentTest.url); | 1085 timedOut.add(status.currentTest.url); |
1086 var id = status.browser.id; | 1086 var id = status.browser.id; |
1087 | 1087 |
1088 status.currentTest.stopwatch.stop(); | 1088 status.currentTest.stopwatch.stop(); |
1089 status.browser.close().then((_) { | 1089 status.browser.close().then((_) { |
1090 var lastKnownMessage = | 1090 var lastKnownMessage = |
1091 'Dom could not be fetched, since the test timed out.'; | 1091 'Dom could not be fetched, since the test timed out.'; |
1092 if (status.currentTest.lastKnownMessage.length > 0) { | 1092 if (status.currentTest.lastKnownMessage.length > 0) { |
1093 lastKnownMessage = status.currentTest.lastKnownMessage; | 1093 lastKnownMessage = status.currentTest.lastKnownMessage; |
1094 } | 1094 } |
| 1095 if (status.lastTest != null) { |
| 1096 lastKnownMessage += '\nPrevious test was ${status.lastTest.url}'; |
| 1097 } |
1095 // Wait until the browser is closed before reporting the test as timeout. | 1098 // Wait until the browser is closed before reporting the test as timeout. |
1096 // This will enable us to capture stdout/stderr from the browser | 1099 // This will enable us to capture stdout/stderr from the browser |
1097 // (which might provide us with information about what went wrong). | 1100 // (which might provide us with information about what went wrong). |
1098 var browserTestOutput = new BrowserTestOutput( | 1101 var browserTestOutput = new BrowserTestOutput( |
1099 status.currentTest.delayUntilTestStarted, | 1102 status.currentTest.delayUntilTestStarted, |
1100 status.currentTest.stopwatch.elapsed, | 1103 status.currentTest.stopwatch.elapsed, |
1101 lastKnownMessage, | 1104 lastKnownMessage, |
1102 status.browser.testBrowserOutput, | 1105 status.browser.testBrowserOutput, |
1103 didTimeout: true); | 1106 didTimeout: true); |
1104 status.currentTest.doneCallback(browserTestOutput); | 1107 status.currentTest.doneCallback(browserTestOutput); |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1779 </div> | 1782 </div> |
1780 <div id="embedded_iframe_div" class="test box"> | 1783 <div id="embedded_iframe_div" class="test box"> |
1781 <iframe style="width:100%;height:100%;" id="embedded_iframe"></iframe> | 1784 <iframe style="width:100%;height:100%;" id="embedded_iframe"></iframe> |
1782 </div> | 1785 </div> |
1783 </body> | 1786 </body> |
1784 </html> | 1787 </html> |
1785 """; | 1788 """; |
1786 return driverContent; | 1789 return driverContent; |
1787 } | 1790 } |
1788 } | 1791 } |
OLD | NEW |