Add test runner.
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/index.html Sun Nov 01 19:07:48 2009 +0100
1.3 @@ -0,0 +1,64 @@
1.4 +<!doctype html>
1.5 +<title>Web DOM Core test suite</title>
1.6 +<style>
1.7 +html, body {
1.8 + margin: 0;
1.9 + height: 100%;
1.10 +}
1.11 +html {
1.12 +margin: 1ex 1em;
1.13 +}
1.14 +table, iframe {
1.15 + width: 100%;
1.16 +}
1.17 +table {
1.18 + display: table-row;
1.19 + margin: 1ex 0;
1.20 +}
1.21 +iframe {
1.22 + display: table-row;
1.23 + height: 100%;
1.24 + border: 1px solid #000;
1.25 +}
1.26 +th, td {
1.27 + text-align: left;
1.28 +}
1.29 +</style>
1.30 +<table>
1.31 + <thead>
1.32 + <tr>
1.33 + <th>File
1.34 + <th>Status
1.35 + <tbody>
1.36 +</table>
1.37 +<iframe></iframe>
1.38 +<script>
1.39 +var files = ["DOMException-constants.html", "DOMImplementation-createDocument-exceptions.html", "DOMImplementation-createDocument-values.html", "DOMImplementation-createDocumentType-exceptions.html", "DOMImplementation-createDocumentType-values.html", "DOMImplementation-hasFeature.html"];
1.40 +
1.41 +var display = document.getElementsByTagName("table")[0],
1.42 + iframe = document.getElementsByTagName("iframe")[0];
1.43 +
1.44 +function run() {
1.45 + file = files.shift();
1.46 + if (!file) {
1.47 + iframe.style.height = document.body.offsetHeight - iframe.offsetTop - iframe.clientTop + "px";
1.48 + return;
1.49 + }
1.50 +
1.51 + var row = display.tBodies[0].insertRow(-1);
1.52 + var cell = row.insertCell(-1);
1.53 + cell.innerHTML = file;
1.54 + cell.onclick = function() {
1.55 + iframe.src = this.innerHTML;
1.56 + iframe.onload = function(){};
1.57 + }
1.58 + var cell = row.insertCell(-1);
1.59 + cell.innerHTML = "Running";
1.60 + iframe.src = file;
1.61 + iframe.onload = function() {
1.62 + cell.innerHTML = iframe.contentWindow.stat.data;
1.63 + run();
1.64 + }
1.65 +}
1.66 +run();
1.67 +</script>
1.68 \ No newline at end of file