Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2026)

Unified Diff: chrome/browser/android/vr_shell/fps_meter_unittest.cc

Issue 2892813002: Fix off-by-one in fps_meter, fix unit test to catch this. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/vr_shell/fps_meter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/fps_meter_unittest.cc
diff --git a/chrome/browser/android/vr_shell/fps_meter_unittest.cc b/chrome/browser/android/vr_shell/fps_meter_unittest.cc
index f5a9c0695defb6f7d441859fc7a2dcee386be2a5..6335af86289f67b3ab7f32bb130dc5077f3f1e85 100644
--- a/chrome/browser/android/vr_shell/fps_meter_unittest.cc
+++ b/chrome/browser/android/vr_shell/fps_meter_unittest.cc
@@ -49,7 +49,7 @@ TEST(FPSMeter, AccurateFPSWithManyFrames) {
EXPECT_FALSE(meter.CanComputeFPS());
EXPECT_FLOAT_EQ(0.0, meter.GetFPS());
- for (int i = 0; i < 5; ++i) {
+ for (size_t i = 0; i < 2 * meter.GetNumFrameTimes(); ++i) {
now += frame_time;
meter.AddFrame(now);
EXPECT_TRUE(meter.CanComputeFPS());
« no previous file with comments | « chrome/browser/android/vr_shell/fps_meter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698