Show gentest.html progress in <title>
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Wed, 09 Nov 2011 11:59:06 -0700
changeset 672 55aba401ca70
parent 671 d062944c5b59
child 673 4615394f458a
Show gentest.html progress in <title>

This doesn't work in Firefox, which doesn't show the updated <title>
until the script runs to completion. But it works in Chrome, which is
good enough for my purposes. I seldom run gentest.html except in both
at once, anyway.
conformancetest/gentest.html
--- a/conformancetest/gentest.html	Wed Nov 09 11:55:15 2011 -0700
+++ b/conformancetest/gentest.html	Wed Nov 09 11:59:06 2011 -0700
@@ -37,6 +37,8 @@
 	document.querySelector("[type=radio][value=gecko]").checked = true;
 }
 
+var originalTitle = document.title;
+
 var testOutput = '';
 
 function generateTests() {
@@ -45,6 +47,7 @@
 
 	testOutput = "var browserTests = [\n";
 	for (var command in tests) {
+		document.title = "(" + command + ") " + originalTitle;
 		tests[command].forEach(function(test) {
 			if (badTests[command].indexOf(test) != -1) {
 				return;
@@ -66,6 +69,8 @@
 		});
 	}
 
+	document.title = "(submitting) " + originalTitle;
+
 	// Finish up our JSON.  First remove the last comma, since JSON doesn't
 	// like that, then add a closing bracket.
 	testOutput = testOutput.substr(0, testOutput.lastIndexOf(","))