git://git.webkit.org
/
WebKit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2009-12-14 Maciej Stachowiak <mjs@apple.com>
[WebKit.git]
/
SunSpider
/
resources
/
driver-TEMPLATE.html
diff --git
a/SunSpider/resources/driver-TEMPLATE.html
b/SunSpider/resources/driver-TEMPLATE.html
index c6a6f1ec035c1175a2015da90f8452ed9aba612c..92ef0fb8866f8a918ec419348c2215e811a88138 100644
(file)
--- a/
SunSpider/resources/driver-TEMPLATE.html
+++ b/
SunSpider/resources/driver-TEMPLATE.html
@@
-30,16
+30,17
@@
<link rel="stylesheet" href="../sunspider.css">
</head>
<link rel="stylesheet" href="../sunspider.css">
</head>
-<body onload="
nex
t()">
+<body onload="
star
t()">
<h2><span id="logo">☀</span>SunSpider JavaScript Benchmark <small>(In Progress...)</small></h2>
<h4>Version: @SUITE@</h4>
<script src="sunspider-test-prefix.js"></script>
<h2><span id="logo">☀</span>SunSpider JavaScript Benchmark <small>(In Progress...)</small></h2>
<h4>Version: @SUITE@</h4>
<script src="sunspider-test-prefix.js"></script>
+<script src="sunspider-test-contents.js"></script>
<script>
var testIndex = -1;
<script>
var testIndex = -1;
-var currentRepeat =
0
;
-var repeatCount =
5
;
+var currentRepeat =
-1
;
+var repeatCount =
10
;
var output = [];
output.length = repeatCount;
var output = [];
output.length = repeatCount;
@@
-47,19
+48,31
@@
for (var i = 0; i < output.length; i++) {
output[i] = {};
}
output[i] = {};
}
-function
nex
t()
+function
star
t()
{
window.setTimeout(reallyNext, 500);
}
{
window.setTimeout(reallyNext, 500);
}
+function next()
+{
+ window.setTimeout(reallyNext, 10);
+}
+
function reallyNext()
{
function reallyNext()
{
+ document.getElementById("frameparent").innerHTML = "";
+ document.getElementById("frameparent").innerHTML = "<iframe id='testframe'>";
+ var testFrame = document.getElementById("testframe");
testIndex++;
if (testIndex < tests.length) {
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;
} 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();
}
} else {
finish();
}
@@
-67,7
+80,8
@@
function reallyNext()
function recordResult(time)
{
function recordResult(time)
{
- output[currentRepeat][tests[testIndex]] = time;
+ if (currentRepeat >= 0) // negative repeats are warmups
+ output[currentRepeat][tests[testIndex]] = time;
next();
}
next();
}
@@
-90,8
+104,8
@@
function finish()
</script>
</script>
-<
iframe id="testframe
">
-</
iframe
>
+<
div id="frameparent
">
+</
div
>
</body>
</html>
</body>
</html>