OLD | NEW |
| (Empty) |
1 --- WebGL/webgl-conformance-tests.html 2010-04-21 11:03:56.000000000 -0700 | |
2 +++ src/webgl-conformance-tests.html 2010-04-21 15:18:24.000000000 -0700 | |
3 @@ -193,6 +193,25 @@ | |
4 this.currentPage = null; | |
5 } | |
6 }; | |
7 + | |
8 + Reporter.prototype.postFinalResults = function() { | |
9 + var xhr = new XMLHttpRequest(); | |
10 + xhr.open('POST', 'http://localhost:8000/WebGL/results', false); | |
11 + xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); | |
12 + xhr.onreadystatechange = function() { | |
13 + if (xhr.readyState != 4) { return; } | |
14 + } | |
15 + var totalPages = 0; | |
16 + var totalSuccessfulPages = 0; | |
17 + for (var url in this.pagesByURL) { | |
18 + ++totalPages; | |
19 + var page = this.pagesByURL[url]; | |
20 + if (page.totalTests == page.totalSuccessful) | |
21 + ++totalSuccessfulPages; | |
22 + } | |
23 + cmd = "total=" + totalPages + "&pass=" + totalSuccessfulPages; | |
24 + xhr.send(cmd); | |
25 + } | |
26 | |
27 Reporter.prototype.displayFinalResults = function() { | |
28 var totalTests = 0; | |
29 @@ -210,7 +229,8 @@ | |
30 } | |
31 var msg = ' (' + totalSuccessful + ' of ' + | |
32 totalTests + ' passed' + timeout + ')'; | |
33 - this.fullResultsNode.textContent = msg; | |
34 + this.fullResultsNode.textContent = msg; | |
35 + this.postFinalResults(); | |
36 }; | |
37 | |
38 Reporter.prototype.reportFunc = function(type, msg, success) { | |
39 @@ -253,7 +273,8 @@ | |
40 button.disabled = true; | |
41 var elem = document.getElementById("nowebgl"); | |
42 elem.style.display = ""; | |
43 - } | |
44 + } | |
45 + testHarness.runTests(); | |
46 } | |
47 </script> | |
48 </head> | |
OLD | NEW |