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

Unified Diff: tools/testing/dart/browser_controller.dart

Issue 23506023: Add div displaying the currently executing test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/browser_controller.dart
===================================================================
--- tools/testing/dart/browser_controller.dart (revision 27017)
+++ tools/testing/dart/browser_controller.dart (working copy)
@@ -48,7 +48,7 @@
Browser();
- factory Browser.byName(String name) {
+ factory Browser.byName(String name, [String binaryLocation]) {
kustermann 2013/09/03 07:35:15 Unused variable!
if (name == 'ff' || name == 'firefox') {
return new Firefox();
} else if (name == 'chrome') {
@@ -459,7 +459,7 @@
* The binary used to run firefox - changing this can be nececcary for
* testing or using non standard firefox installation.
*/
- static const String binary = "firefox";
+ static const String _binary = "firefox";
kustermann 2013/09/03 07:35:15 You still use 'binary'!
static const String enablePopUp =
'user_pref("dom.disable_open_during_load", false);';
@@ -1005,6 +1005,9 @@
var testing_window;
var embedded_iframe = document.getElementById('embedded_iframe');
+ var number_div = document.getElementById('number');
+ var executing_div = document.getElementById('currently_executing');
+ var error_div = document.getElementById('unhandled_error');
var use_iframe = ${useIframe};
var start = new Date();
@@ -1054,7 +1057,8 @@
function run(url) {
number_of_tests++;
- document.getElementById('number').innerHTML = number_of_tests;
+ number_div.innerHTML = number_of_tests;
+ executing_div.innerHTML = url;
if (use_iframe) {
embedded_iframe.src = url;
} else {
@@ -1077,8 +1081,9 @@
function reportError(msg) {
function handleReady() {
if (this.readyState == this.DONE && this.status != 200) {
- // We could not report, pop up to notify if running interactively.
- alert(this.status);
+ var error = 'Sending back error did not succeeed: ' + this.status;
+ error = error + '. Failed to send msg: ' + msg;
+ error_div.innerHTML = error;
}
}
contactBrowserController(
@@ -1129,7 +1134,9 @@
</script>
</head>
<body onload="startTesting()">
- Dart test driver, number of tests: <div id="number"></div>
+ Dart test driver, number of tests: <div id="number"></div><br>
+ Currently executing: <div id="currently_executing"></div><br>
+ Unhandled error: <div id="unhandled_error"></div>
<iframe id="embedded_iframe"></iframe>
</body>
</html>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698