8 Copyright (C) 2007 Apple Inc. All rights reserved.
10 Redistribution and use in source and binary forms, with or without
11 modification, are permitted provided that the following conditions
13 1. Redistributions of source code must retain the above copyright
14 notice, this list of conditions and the following disclaimer.
15 2. Redistributions in binary form must reproduce the above copyright
16 notice, this list of conditions and the following disclaimer in the
17 documentation and/or other materials provided with the distribution.
19 THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
20 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
23 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
27 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 <title>SunSpider 1.0 JavaScript Benchmark (@SUITE@ test suite - In Progress...)</title>
33 <link rel="stylesheet" href="../sunspider.css">
36 <body onload="start()">
38 <h2><span id="logo">☀</span>SunSpider JavaScript Benchmark <small>(In Progress...)</small></h2>
39 <h3>Content Version: @SUITE@</h3>
41 <script src="sunspider-test-prefix.js"></script>
42 <script src="sunspider-test-contents.js"></script>
45 var currentRepeat = -1;
49 output.length = repeatCount;
50 for (var i = 0; i < output.length; i++) {
56 window.setTimeout(reallyNext, 500);
61 window.setTimeout(reallyNext, 10);
66 document.getElementById("frameparent").innerHTML = "";
67 document.getElementById("frameparent").innerHTML = "<iframe id='testframe'>";
68 var testFrame = document.getElementById("testframe");
70 if (testIndex < tests.length) {
71 testFrame.contentDocument.open();
72 testFrame.contentDocument.write(testContents[testIndex]);
73 testFrame.contentDocument.close();
74 } else if (++currentRepeat < repeatCount) {
76 testFrame.contentDocument.open();
77 testFrame.contentDocument.write(testContents[testIndex]);
78 testFrame.contentDocument.close();
84 function recordResult(time)
86 if (currentRepeat >= 0) // negative repeats are warmups
87 output[currentRepeat][tests[testIndex]] = time;
93 var outputString = "{";
94 outputString += '"v": "@SUITE@", ';
95 for (var test in output[0]) {
96 outputString += '"' + test + '":[';
97 for (var i = 0; i < output.length; i++) {
98 outputString += output[i][test] + ",";
100 outputString = outputString.substring(0, outputString.length - 1);
101 outputString += "],";
103 outputString = outputString.substring(0, outputString.length - 1);
106 location = "results.html?" + encodeURI(outputString);
111 <div id="frameparent">