Commit b874a4e1 authored by Xida Chen's avatar Xida Chen Committed by Commit Bot

Fix a throughput test case

This particular test case was changed here:
https://chromium-review.googlesource.com/c/chromium/src/+/2022618

And that CL made a mistake. In particular, it added a shouldDelay
which is meant to be used to delay the start of the main-thread
animation, but shouldDelay is not used.

This CL fixes that.

Bug: None
Change-Id: Ia8c2c1fea0918aee69ff07808969d7ac70f48cd9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2154819
Commit-Queue: Xida Chen <xidachen@chromium.org>
Reviewed-by: default avatarYi Gu <yigu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760210}
parent bdfa369b
...@@ -55,7 +55,7 @@ const skipEvery = targetMainFps > 0 ? parseInt(60 / targetMainFps) : 0; ...@@ -55,7 +55,7 @@ const skipEvery = targetMainFps > 0 ? parseInt(60 / targetMainFps) : 0;
const query = window.location.search.substr(1).split('&'); const query = window.location.search.substr(1).split('&');
const shouldJank = query.indexOf('jank') >= 0; const shouldJank = query.indexOf('jank') >= 0;
// Delay the start of the main thread animation by 2 seconds to test the // Delay the start of the main thread animation by 1 seconds to test the
// aggregation of the main and compositor thread throughput. // aggregation of the main and compositor thread throughput.
const shouldDelay = query.indexOf('delay') >= 0; const shouldDelay = query.indexOf('delay') >= 0;
...@@ -72,8 +72,9 @@ var frameCount = 0; ...@@ -72,8 +72,9 @@ var frameCount = 0;
var startTime; var startTime;
function animateStep() { function animateStep() {
if (skipEvery && ++frameCount % skipEvery == 0 && const shouldStart = (skipEvery && ++frameCount % skipEvery == 0) &&
(new Date() - startTime) >= 1000) { (!shouldDelay || (new Date() - startTime) >= 1000);
if (shouldStart) {
if (incrementing) { if (incrementing) {
currentValue += valueChange; currentValue += valueChange;
if (currentValue >= maxValue) if (currentValue >= maxValue)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment