Fold markers for manualtest.js
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Thu, 23 Jun 2011 14:43:28 -0600
changeset 315 1480f4a5da74
parent 314 959fab2bb689
child 316 503076bbf557
Fold markers for manualtest.js
manualtest.js
--- a/manualtest.js	Thu Jun 23 12:33:16 2011 -0600
+++ b/manualtest.js	Thu Jun 23 14:43:28 2011 -0600
@@ -1,5 +1,6 @@
 // If globalValue isn't set, we don't support non-default values for manual
 // tests, so only strings need apply.
+//@{
 if ("globalValue" in window) {
 	tests = tests[command].filter(function(test) {
 		return typeof test == "object"
@@ -8,20 +9,24 @@
 } else {
 	tests = tests[command].filter(function(test) { return typeof test == "string"});
 }
+//@}
 
 var testsRunning = false;
 
 function clearCachedResults() {
+//@{
 	for (var key in localStorage) {
 		if (RegExp("^" + keyname + "test-").test(key)) {
 			localStorage.removeItem(key);
 		}
 	}
 }
+//@}
 
 var numManualTests = 0;
 
 function runTests() {
+//@{
 	// We don't ask the user to hit a key on all tests, so make sure not to
 	// claim more tests are going to be run than actually are.
 	for (var i = 0; i < tests.length; i++) {
@@ -42,8 +47,10 @@
 	input.focus();
 	addTestButton.click();
 }
+//@}
 
 function addTest() {
+//@{
 	var tr = doSetup("#tests table", 0);
 	var input = document.querySelector("#tests label input");
 	var test = input.value;
@@ -72,8 +79,10 @@
 		});
 	}
 }
+//@}
 
 function runNextTest(test) {
+//@{
 	doTearDown();
 	var input = document.querySelector("#tests label input");
 	if (!testsRunning) {
@@ -95,8 +104,10 @@
 	input.focus();
 	addTest();
 }
+//@}
 
 function doBrowserCell(tr, test, callback) {
+//@{
 	var browserCell = document.createElement("td");
 	tr.appendChild(browserCell);
 
@@ -129,8 +140,10 @@
 		callback();
 	}
 }
+//@}
 
 function continueBrowserCell(test, testDiv, browserCell) {
+//@{
 	try {
 		testDiv.contentEditable = "inherit";
 		testDiv.removeAttribute("spellcheck");
@@ -175,3 +188,5 @@
 
 	localStorage[keyname + "test-" + test] = browserCell.innerHTML;
 }
+//@}
+// vim: [email protected]{,@} foldmethod=marker