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.test.suitebuilder.annotation.SmallTest; | 7 import android.test.suitebuilder.annotation.SmallTest; |
8 | 8 |
9 import org.chromium.base.annotations.SuppressFBWarnings; | 9 import org.chromium.base.annotations.SuppressFBWarnings; |
10 import org.chromium.base.test.util.Feature; | 10 import org.chromium.base.test.util.Feature; |
11 import org.chromium.chrome.browser.preferences.privacy.CrashReportingPermissionM
anager; | 11 import org.chromium.chrome.browser.preferences.privacy.CrashReportingPermissionM
anager; |
12 import org.chromium.chrome.browser.util.HttpURLConnectionFactory; | 12 import org.chromium.components.minidump_uploader.util.HttpURLConnectionFactory; |
13 | 13 |
14 import java.io.BufferedReader; | 14 import java.io.BufferedReader; |
15 import java.io.ByteArrayInputStream; | 15 import java.io.ByteArrayInputStream; |
16 import java.io.ByteArrayOutputStream; | 16 import java.io.ByteArrayOutputStream; |
17 import java.io.File; | 17 import java.io.File; |
18 import java.io.FileNotFoundException; | 18 import java.io.FileNotFoundException; |
19 import java.io.FileOutputStream; | 19 import java.io.FileOutputStream; |
20 import java.io.FileReader; | 20 import java.io.FileReader; |
21 import java.io.IOException; | 21 import java.io.IOException; |
22 import java.io.InputStream; | 22 import java.io.InputStream; |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 | 571 |
572 // Sanity check on the time stamp (within an hour). | 572 // Sanity check on the time stamp (within an hour). |
573 // Chances are the write and the check should have less than 1 second in
between. | 573 // Chances are the write and the check should have less than 1 second in
between. |
574 assertTrue(time <= now); | 574 assertTrue(time <= now); |
575 assertTrue(time > now - 60 * 60); | 575 assertTrue(time > now - 60 * 60); |
576 | 576 |
577 String id = lastEntry.substring(seperator + 1, lastEntry.length()); | 577 String id = lastEntry.substring(seperator + 1, lastEntry.length()); |
578 assertEquals(id, CRASH_ID); | 578 assertEquals(id, CRASH_ID); |
579 } | 579 } |
580 } | 580 } |
OLD | NEW |