| function SputnikError(message) |
| SputnikError.prototype.toString = function () |
| return 'SputnikError: ' + this.message; |
| var span = document.createElement("span"); |
| document.getElementById("console").appendChild(span); // insert it first so XHTML knows the namespace |
| span.innerHTML = msg + '<br />'; |
| function escapeHTML(text) |
| return text.toString().replace(/&/g, "&").replace(/</g, "<"); |
| function printTestPassed(msg) |
| testPrint('<span><span class="pass">PASS</span> ' + escapeHTML(msg) + '</span>'); |
| function printTestFailed(msg) |
| testPrint('<span><span class="fail">FAIL</span> ' + escapeHTML(msg) + '</span>'); |
| throw new SputnikError(msg); |
| var successfullyParsed = false; |
| * @section: 15.1.1.2, 15.1.2.4; |
| * @description: The Infinity is not ReadOnly, check isFinite for resettability of result |
| testFailed('#1: isFinite resettability of result for Infinity value'); |
| var successfullyParsed = true; |
| printTestFailed('successfullyParsed is not set'); |
| else if (sputnikException) |
| printTestFailed(sputnikException); |
| testPrint('<br /><span class="pass">TEST COMPLETE</span>'); |