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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/VSyncMonitorTest.java

Issue 1789803003: Remove synthetic vsync from Android VsyncMonitor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused variable Created 4 years, 9 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 | « no previous file | ui/android/java/src/org/chromium/ui/VSyncMonitor.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/javatests/src/org/chromium/content/browser/VSyncMonitorTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/VSyncMonitorTest.java b/content/public/android/javatests/src/org/chromium/content/browser/VSyncMonitorTest.java
index 7b34461316b3fcac311907fe7269a45144d2a635..e47b9807b6e9f3b4cb48565bcb44e60c4726e430 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/VSyncMonitorTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/VSyncMonitorTest.java
@@ -5,7 +5,6 @@
package org.chromium.content.browser;
import android.content.Context;
-import android.os.SystemClock;
import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.MediumTest;
import android.view.WindowManager;
@@ -25,7 +24,6 @@ public class VSyncMonitorTest extends InstrumentationTestCase {
private static class VSyncDataCollector implements VSyncMonitor.Listener {
public long mFramePeriods[];
public int mFrameCount;
- public long mLastVSyncCpuTimeMillis;
private boolean mDone;
private long mPreviousVSyncTimeMicros;
@@ -44,7 +42,6 @@ public class VSyncMonitorTest extends InstrumentationTestCase {
@Override
public void onVSync(VSyncMonitor monitor, long vsyncTimeMicros) {
ThreadUtils.assertOnUiThread();
- mLastVSyncCpuTimeMillis = SystemClock.uptimeMillis();
if (mPreviousVSyncTimeMicros == 0) {
mPreviousVSyncTimeMicros = vsyncTimeMicros;
} else {
@@ -127,21 +124,4 @@ public class VSyncMonitorTest extends InstrumentationTestCase {
assertTrue(monitor.getVSyncPeriodInMicroseconds() < 1000000 / 30);
}
}
-
- @MediumTest
- public void testVSyncActivationFromIdle() throws InterruptedException {
- // Check that the vsync period roughly matches the timestamps that the monitor generates.
- VSyncDataCollector collector = new VSyncDataCollector(1);
- VSyncMonitor monitor = createVSyncMonitor(collector);
-
- requestVSyncMonitorUpdate(monitor);
- collector.waitTillDone();
- assertTrue(collector.isDone());
-
- long period = monitor.getVSyncPeriodInMicroseconds() / 1000;
- long delay = SystemClock.uptimeMillis() - collector.mLastVSyncCpuTimeMillis;
-
- // The VSync should have activated immediately instead of at the next real vsync.
- assertTrue(delay < period);
- }
}
« no previous file with comments | « no previous file | ui/android/java/src/org/chromium/ui/VSyncMonitor.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698