summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/PerformanceTests
diff options
context:
space:
mode:
authorzoltan@webkit.org <zoltan@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2012-10-24 06:43:28 +0000
committerzoltan@webkit.org <zoltan@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2012-10-24 06:43:28 +0000
commit8df85ad69a04d6ef783e91d6e7bc59ac01f73414 (patch)
treee0e3618d7893b350dd23cd0c5775c7d634fdcdf9 /third_party/WebKit/PerformanceTests
parentcb26997f4f42b5e542325a4e6fb0ce672e6c61c3 (diff)
downloadchromium_src-8df85ad69a04d6ef783e91d6e7bc59ac01f73414.zip
chromium_src-8df85ad69a04d6ef783e91d6e7bc59ac01f73414.tar.gz
chromium_src-8df85ad69a04d6ef783e91d6e7bc59ac01f73414.tar.bz2
Store the loaded file locally in measurePageLoadTime
https://bugs.webkit.org/show_bug.cgi?id=100172 Reviewed by Csaba Osztrogonác. Store the loaded file as a local variable instead of attaching it to the test object. Handle chunkSize inside test.run. * resources/runner.js: (.): git-svn-id: svn://svn.chromium.org/blink/trunk@132316 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/PerformanceTests')
-rw-r--r--third_party/WebKit/PerformanceTests/ChangeLog13
-rwxr-xr-xthird_party/WebKit/PerformanceTests/resources/runner.js14
2 files changed, 20 insertions, 7 deletions
diff --git a/third_party/WebKit/PerformanceTests/ChangeLog b/third_party/WebKit/PerformanceTests/ChangeLog
index 617bce4..7f2aba9 100644
--- a/third_party/WebKit/PerformanceTests/ChangeLog
+++ b/third_party/WebKit/PerformanceTests/ChangeLog
@@ -1,5 +1,18 @@
2012-10-23 Zoltan Horvath <zoltan@webkit.org>
+ Store the loaded file locally in measurePageLoadTime
+ https://bugs.webkit.org/show_bug.cgi?id=100172
+
+ Reviewed by Csaba Osztrogonác.
+
+ Store the loaded file as a local variable instead of attaching it to the test object.
+ Handle chunkSize inside test.run.
+
+ * resources/runner.js:
+ (.):
+
+2012-10-23 Zoltan Horvath <zoltan@webkit.org>
+
Add measurePageLoadTime function to PerfTestRunner
https://bugs.webkit.org/show_bug.cgi?id=100029
diff --git a/third_party/WebKit/PerformanceTests/resources/runner.js b/third_party/WebKit/PerformanceTests/resources/runner.js
index 6df3b9f..278c176 100755
--- a/third_party/WebKit/PerformanceTests/resources/runner.js
+++ b/third_party/WebKit/PerformanceTests/resources/runner.js
@@ -306,18 +306,22 @@ if (window.testRunner) {
PerfTestRunner.measurePageLoadTime = function(test) {
test.run = function() {
+ var file = PerfTestRunner.loadFile(test.path);
+ if (!test.chunkSize)
+ this.chunkSize = 50000;
+
var chunks = [];
// The smaller the chunks the more style resolves we do.
// Smaller chunk sizes will show more samples in style resolution.
// Larger chunk sizes will show more samples in line layout.
// Smaller chunk sizes run slower overall, as the per-chunk overhead is high.
- var chunkCount = Math.ceil(this.file.length / this.chunkSize);
+ var chunkCount = Math.ceil(file.length / this.chunkSize);
for (var chunkIndex = 0; chunkIndex < chunkCount; chunkIndex++) {
- var chunk = this.file.substr(chunkIndex * this.chunkSize, this.chunkSize);
+ var chunk = file.substr(chunkIndex * this.chunkSize, this.chunkSize);
chunks.push(chunk);
}
- PerfTestRunner.logInfo("Testing " + this.file.length + " byte document in " + chunkCount + " " + this.chunkSize + " byte chunks.");
+ PerfTestRunner.logInfo("Testing " + file.length + " byte document in " + chunkCount + " " + this.chunkSize + " byte chunks.");
var iframe = document.createElement("iframe");
document.body.appendChild(iframe);
@@ -341,10 +345,6 @@ if (window.testRunner) {
document.body.removeChild(iframe);
};
- this.file = PerfTestRunner.loadFile(test.path);
- if (!test.chunkSize)
- this.chunkSize = 50000;
-
PerfTestRunner.measureTime(test);
}