| OLD | NEW |
| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 TestLogcatExtractionRunnable(Context context, File minidump) { | 42 TestLogcatExtractionRunnable(Context context, File minidump) { |
| 43 super(minidump); | 43 super(minidump); |
| 44 } | 44 } |
| 45 | 45 |
| 46 @Override | 46 @Override |
| 47 protected List<String> getLogcat() { | 47 protected List<String> getLogcat() { |
| 48 return LOGCAT; | 48 return LOGCAT; |
| 49 } | 49 } |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 // TODO(crbug/716236): Refer to this crbug for compilation error after the O
SDK is rolled. |
| 52 @TargetApi(Build.VERSION_CODES.M) | 53 @TargetApi(Build.VERSION_CODES.M) |
| 53 private static class TestJobScheduler extends JobScheduler { | 54 private static class TestJobScheduler extends JobScheduler { |
| 54 TestJobScheduler() {} | 55 TestJobScheduler() {} |
| 55 | 56 |
| 56 @Override | 57 @Override |
| 57 public void cancel(int jobId) {} | 58 public void cancel(int jobId) {} |
| 58 | 59 |
| 59 @Override | 60 @Override |
| 60 public void cancelAll() {} | 61 public void cancelAll() {} |
| 61 | 62 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 | 184 |
| 184 final File minidump = createMinidump("test.dmp"); | 185 final File minidump = createMinidump("test.dmp"); |
| 185 Context testContext = new TestContext(getInstrumentation().getTargetCont
ext()); | 186 Context testContext = new TestContext(getInstrumentation().getTargetCont
ext()); |
| 186 | 187 |
| 187 LogcatExtractionRunnable runnable = new TestLogcatExtractionRunnable(tes
tContext, minidump); | 188 LogcatExtractionRunnable runnable = new TestLogcatExtractionRunnable(tes
tContext, minidump); |
| 188 runnable.run(); | 189 runnable.run(); |
| 189 | 190 |
| 190 verifyMinidumpWithLogcat("test.dmp.try0"); | 191 verifyMinidumpWithLogcat("test.dmp.try0"); |
| 191 } | 192 } |
| 192 } | 193 } |
| OLD | NEW |