Reviewed by Mark.
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Dec 2007 09:43:01 +0000 (09:43 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Dec 2007 09:43:01 +0000 (09:43 +0000)
        - Change the format of the output URL to be shorter, to meet IE constraints

        * hosted/sunspider-driver.html:
        * hosted/sunspider-results.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28801 268f45cc-cd09-0410-ab3c-d52691b4dbfc

SunSpider/ChangeLog
SunSpider/hosted/sunspider-driver.html
SunSpider/hosted/sunspider-results.html

index 39ad6ec..f68e4d3 100644 (file)
@@ -1,3 +1,12 @@
+2007-12-17  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Mark.
+        
+        - Change the format of the output URL to be shorter, to meet IE constraints
+
+        * hosted/sunspider-driver.html:
+        * hosted/sunspider-results.html:
+
 2007-12-13  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Oliver.
index f61d0a9..16fbca9 100644 (file)
@@ -72,17 +72,17 @@ function recordResult(time)
 
 function finish()
 {
-    var outputString = "[";
-    for (var i = 0; i < output.length; i++) {
-        outputString += "{";
-        for (var test in output[i]) {
-            outputString += '"' + test + '":' + output[i][test] + ",";
+    var outputString = "{";
+    for (var test in output[0]) {
+        outputString += '"' + test + '":[';
+        for (var i = 0; i < output.length; i++) {
+             outputString += output[i][test] + ",";
         }
         outputString = outputString.substring(0, outputString.length - 1);
-        outputString += "},";
+        outputString += "],";
     }
     outputString = outputString.substring(0, outputString.length - 1);
-    outputString += "]";
+    outputString += "}";
 
     location = "sunspider-results.html?" + encodeURI(outputString);
 }
index f860edf..415c804 100644 (file)
 
 
 <script>
-var output = eval(decodeURI(location.search.substring(1)));
+var output = pivot(eval("(" + decodeURI(location.search.substring(1)) + ")"));
+
+function pivot(input) {
+    var output = [];
+    for (var test in input) {
+        for (var i = 0; i < input[test].length; i++) {
+             if (!output[i])
+                 output[i] = {};
+             output[i][test] =  input[test][i];
+        }
+    }
+    return output;
+}
+
 function print(str) {
     var console = document.getElementById("console");
     console.appendChild(document.createTextNode(str));