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

Unified Diff: android/javatests/src/org/chromium/base/ObserverListTest.java

Issue 2043183002: Update to Chromium //base at Chromium commit 01cb97b2e09618bbc3a60c7348f0a844eea20547. (Closed) Base URL: https://github.com/domokit/base.git@master
Patch Set: Created 4 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
« no previous file with comments | « android/java/src/org/chromium/base/library_loader/ModernLinker.java ('k') | android/linker/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android/javatests/src/org/chromium/base/ObserverListTest.java
diff --git a/android/javatests/src/org/chromium/base/ObserverListTest.java b/android/javatests/src/org/chromium/base/ObserverListTest.java
index 973682b9328c0ff534bb58146387e395a4580311..94a9c71cc4fbee72b2c8dcd2db4ce33c615ac1ce 100644
--- a/android/javatests/src/org/chromium/base/ObserverListTest.java
+++ b/android/javatests/src/org/chromium/base/ObserverListTest.java
@@ -9,6 +9,7 @@ import android.test.suitebuilder.annotation.SmallTest;
import org.chromium.base.test.util.Feature;
+import java.util.Collection;
import java.util.Iterator;
import java.util.NoSuchElementException;
@@ -70,7 +71,9 @@ public class ObserverListTest extends InstrumentationTestCase {
}
}
+ @SuppressWarnings("ElementsCountedInLoop")
private static <T> int getSizeOfIterable(Iterable<T> iterable) {
+ if (iterable instanceof Collection<?>) return ((Collection<?>) iterable).size();
int num = 0;
for (T el : iterable) num++;
return num;
« no previous file with comments | « android/java/src/org/chromium/base/library_loader/ModernLinker.java ('k') | android/linker/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698