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

Unified Diff: content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java

Issue 1423713013: GN(Android): Fix CleanupReferenceTest#testCreateMany failing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | no next file » | 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/common/CleanupReferenceTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java b/content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java
index dc61afc0f18ed8c3045c468bf2761f3c057fad89..602d2f6b625873bacd9a3e8ced9300a7c0727b65 100644
--- a/content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/common/CleanupReferenceTest.java
@@ -91,6 +91,9 @@ public class CleanupReferenceTest extends InstrumentationTestCase {
instances = null;
// Ensure compiler / instrumentation does not strip out the assignment.
assertTrue(instances == null);
+ // Calling sObjectCount.get() before collectGarbage() seems to be required for the objects
+ // to be GC'ed only when building using GN.
+ assertTrue(sObjectCount.get() != -1);
collectGarbage();
assertTrue(CriteriaHelper.pollForCriteria(new Criteria() {
@Override
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698