| Index: third_party/WebKit/PerformanceTests/Paint/large-table-background-change-with-visible-collapsed-borders.html
|
| diff --git a/third_party/WebKit/PerformanceTests/Paint/large-table-background-change-with-visible-collapsed-borders.html b/third_party/WebKit/PerformanceTests/Paint/large-table-background-change-with-visible-collapsed-borders.html
|
| index c3f47f7e695382eba742fc842f93443afbe0e840..d331e7250078c209fcd3d53b9def89572162687b 100644
|
| --- a/third_party/WebKit/PerformanceTests/Paint/large-table-background-change-with-visible-collapsed-borders.html
|
| +++ b/third_party/WebKit/PerformanceTests/Paint/large-table-background-change-with-visible-collapsed-borders.html
|
| @@ -3,14 +3,6 @@
|
| <pre id="log"></pre>
|
| <style>td { border: 1px solid blue }</style>
|
| <script>
|
| -// We discard the first iteration to avoid a cold outlier.
|
| -var iterations = 11;
|
| -var results = [];
|
| -var previousFrameTime = -1;
|
| -var now = function(){
|
| - return window.performance ? performance.now() : Date.now();
|
| -};
|
| -
|
| function createTable(rows, columns) {
|
| var table = document.createElement("TABLE");
|
| // Collapsing border is not necessary to see the slowness
|
| @@ -27,37 +19,18 @@ function createTable(rows, columns) {
|
| return table;
|
| }
|
|
|
| -
|
| var table = createTable(300, 320);
|
| -document.body.appendChild(table);
|
| -
|
| -ix=30;
|
| -iy=30;
|
| -
|
| -function toggleBackgroundColor()
|
| -{
|
| - var thisFrameTime = now();
|
| - if (previousFrameTime != -1)
|
| - results.push(thisFrameTime - previousFrameTime);
|
| - previousFrameTime = thisFrameTime;
|
| -
|
| - if (iterations == 0) {
|
| - PerfTestRunner.logStatistics(results, 'ms', "Time:");
|
| - if (window.testRunner)
|
| - testRunner.notifyDone();
|
| - } else {
|
| - iterations--;
|
| - window.requestAnimationFrame(toggleBackgroundColor);
|
| - }
|
| -
|
| - table.childNodes[iy].childNodes[ix].style.backgroundColor = 'teal';
|
| - ix++;
|
| - iy++;
|
| -}
|
| -
|
| -if (window.testRunner)
|
| - testRunner.waitUntilDone();
|
| -
|
| -// Start the test after two frame to ensure we have set-up, laid out and painted the table.
|
| -window.requestAnimationFrame(function() { window.requestAnimationFrame(toggleBackgroundColor) });
|
| +document.body.insertBefore(table, log);
|
| +
|
| +var ix = 30;
|
| +var iy = 30;
|
| +
|
| +PerfTestRunner.measureFrameTime({
|
| + run: function() {
|
| + table.childNodes[iy].childNodes[ix].style.backgroundColor = 'teal';
|
| + ix++;
|
| + iy++;
|
| + },
|
| + warmUpCount: 5,
|
| +});
|
| </script>
|
|
|