<h4>Version: @SUITE@</h4>
<script src="sunspider-test-prefix.js"></script>
+<script src="sunspider-test-contents.js"></script>
<script>
var testIndex = -1;
-var currentRepeat = 0;
-var repeatCount = 5;
+var currentRepeat = -1;
+var repeatCount = 10;
var output = [];
output.length = repeatCount;
output[i] = {};
}
-function next()
+function start()
{
window.setTimeout(reallyNext, 500);
}
+function next()
+{
+ window.setTimeout(reallyNext, 10);
+}
+
function reallyNext()
{
+ document.getElementById("frameparent").innerHTML = "";
+ document.getElementById("frameparent").innerHTML = "<iframe id='testframe'>";
+ var testFrame = document.getElementById("testframe");
testIndex++;
if (testIndex < tests.length) {
- document.getElementById("testframe").src = tests[testIndex] + ".html";
+ testFrame.contentDocument.open();
+ testFrame.contentDocument.write(testContents[testIndex]);
+ testFrame.contentDocument.close;
} else if (++currentRepeat < repeatCount) {
testIndex = 0;
- document.getElementById("testframe").src = tests[testIndex] + ".html";
+ testFrame.contentDocument.open();
+ testFrame.contentDocument.write(testContents[testIndex]);
+ testFrame.contentDocument.close;
} else {
finish();
}
function recordResult(time)
{
- output[currentRepeat][tests[testIndex]] = time;
+ if (currentRepeat >= 0) // negative repeats are warmups
+ output[currentRepeat][tests[testIndex]] = time;
next();
}
</script>
-<iframe id="testframe">
-</iframe>
+<div id="frameparent">
+</div>
</body>
</html>