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

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

Issue 2780063003: [M58 Branch (merge)] Fix the test build. (Closed)
Patch Set: Created 3 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 | chrome/android/javatests/src/org/chromium/chrome/browser/crash/MinidumpUploadServiceTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/crash/LogcatExtractionRunnableTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/crash/LogcatExtractionRunnableTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/crash/LogcatExtractionRunnableTest.java
index 727ce4987d8df4a53d460539b8fcf7dea50a402d..77523d2e0b0d4d41b3315d0c0403f02846095a3a 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/crash/LogcatExtractionRunnableTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/crash/LogcatExtractionRunnableTest.java
@@ -26,9 +26,9 @@ import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Arrays;
-import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
-import java.util.Map;
+import java.util.Set;
/**
* Unittests for {@link LogcatExtractionRunnable}.
@@ -77,7 +77,7 @@ public class LogcatExtractionRunnableTest extends CrashTestCase {
assertEquals(TaskIds.CHROME_MINIDUMP_UPLOADING_JOB_ID, job.getId());
assertEquals(ChromeMinidumpUploadJobService.class.getName(),
job.getService().getClassName());
- return 0;
+ return JobScheduler.RESULT_SUCCESS;
}
};
@@ -125,7 +125,7 @@ public class LogcatExtractionRunnableTest extends CrashTestCase {
@Override
protected void tearDown() throws Exception {
- ChromeFeatureList.setTestFeatures(null);
+ ChromeFeatureList.setTestEnabledFeatures(null);
super.tearDown();
}
@@ -135,9 +135,11 @@ public class LogcatExtractionRunnableTest extends CrashTestCase {
* @param enable Whether to enable the JobScheduler API.
*/
private void setJobSchedulerEnabled(boolean enable) {
- Map<String, Boolean> features = new HashMap<>();
- features.put(ChromeFeatureList.UPLOAD_CRASH_REPORTS_USING_JOB_SCHEDULER, enable);
- ChromeFeatureList.setTestFeatures(features);
+ Set<String> features = new HashSet<>();
+ if (enable) {
+ features.add(ChromeFeatureList.UPLOAD_CRASH_REPORTS_USING_JOB_SCHEDULER);
+ }
+ ChromeFeatureList.setTestEnabledFeatures(features);
}
/**
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/crash/MinidumpUploadServiceTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698