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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java

Issue 1190103002: Make lint fail builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix exported crash for ChromeShellTest Created 5 years, 6 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
Index: chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java
index 7922a1acb76f691a02941390c7179633deab6416..551e8332d4163412582663c65be89531bc17e416 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java
@@ -7,6 +7,7 @@ package org.chromium.chrome.browser;
import android.test.FlakyTest;
import android.test.suitebuilder.annotation.LargeTest;
import android.util.SparseArray;
+import android.util.SparseBooleanArray;
import org.chromium.base.ThreadUtils;
import org.chromium.base.test.util.CommandLineFlags;
@@ -38,7 +39,7 @@ public class BindingManagerIntegrationTest extends ChromeActivityTestCaseBase<Ch
private static class MockBindingManager implements BindingManager {
// Maps pid to the last received visibility state of the renderer.
- private final SparseArray<Boolean> mProcessInForegroundMap = new SparseArray<Boolean>();
+ private final SparseBooleanArray mProcessInForegroundMap = new SparseBooleanArray();
// Maps pid to a string recording calls to setInForeground() and visibilityDetermined().
private final SparseArray<String> mVisibilityCallsMap = new SparseArray<String>();
@@ -51,7 +52,7 @@ public class BindingManagerIntegrationTest extends ChromeActivityTestCaseBase<Ch
}
boolean setInForegroundWasCalled(int pid) {
- return mProcessInForegroundMap.get(pid) != null;
+ return mProcessInForegroundMap.indexOfKey(pid) >= 0;
}
String getVisibilityCalls(int pid) {

Powered by Google App Engine
This is Rietveld 408576698