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

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

Issue 2779693004: [Merge] Fix minidump-related JobScheduler test failures. (Closed)
Patch Set: Created 3 years, 8 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.crash; 5 package org.chromium.chrome.browser.crash;
6 6
7 import android.annotation.TargetApi; 7 import android.annotation.TargetApi;
8 import android.app.job.JobInfo; 8 import android.app.job.JobInfo;
9 import android.app.job.JobScheduler; 9 import android.app.job.JobScheduler;
10 import android.content.ComponentName; 10 import android.content.ComponentName;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 @Override 70 @Override
71 public JobInfo getPendingJob(int jobId) { 71 public JobInfo getPendingJob(int jobId) {
72 return null; 72 return null;
73 } 73 }
74 74
75 @Override 75 @Override
76 public int schedule(JobInfo job) { 76 public int schedule(JobInfo job) {
77 assertEquals(TaskIds.CHROME_MINIDUMP_UPLOADING_JOB_ID, job.getId()); 77 assertEquals(TaskIds.CHROME_MINIDUMP_UPLOADING_JOB_ID, job.getId());
78 assertEquals(ChromeMinidumpUploadJobService.class.getName(), 78 assertEquals(ChromeMinidumpUploadJobService.class.getName(),
79 job.getService().getClassName()); 79 job.getService().getClassName());
80 return 0; 80 return JobScheduler.RESULT_SUCCESS;
81 } 81 }
82 }; 82 };
83 83
84 // Responsible for verifying that the correct intent is fired after the logc at is extracted. 84 // Responsible for verifying that the correct intent is fired after the logc at is extracted.
85 private class TestContext extends AdvancedMockContext { 85 private class TestContext extends AdvancedMockContext {
86 int mNumServiceStarts; 86 int mNumServiceStarts;
87 87
88 TestContext(Context realContext) { 88 TestContext(Context realContext) {
89 super(realContext); 89 super(realContext);
90 } 90 }
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 setJobSchedulerEnabled(true); 208 setJobSchedulerEnabled(true);
209 final File minidump = createMinidump("test.dmp"); 209 final File minidump = createMinidump("test.dmp");
210 Context testContext = new TestContext(getInstrumentation().getTargetCont ext()); 210 Context testContext = new TestContext(getInstrumentation().getTargetCont ext());
211 211
212 LogcatExtractionRunnable runnable = new TestLogcatExtractionRunnable(tes tContext, minidump); 212 LogcatExtractionRunnable runnable = new TestLogcatExtractionRunnable(tes tContext, minidump);
213 runnable.run(); 213 runnable.run();
214 214
215 verifyMinidumpWithLogcat("test.dmp.try0"); 215 verifyMinidumpWithLogcat("test.dmp.try0");
216 } 216 }
217 } 217 }
OLDNEW
« 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