OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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.offlinepages; | 5 package org.chromium.chrome.browser.offlinepages; |
6 | 6 |
7 import android.app.NotificationManager; | 7 import android.app.NotificationManager; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.os.Environment; | 9 import android.os.Environment; |
10 import android.text.TextUtils; | 10 import android.text.TextUtils; |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 case BackgroundSavePageResult.FOREGROUND_CANCELED: | 390 case BackgroundSavePageResult.FOREGROUND_CANCELED: |
391 return "FOREGROUND_CANCELED"; | 391 return "FOREGROUND_CANCELED"; |
392 case BackgroundSavePageResult.SAVE_FAILED: | 392 case BackgroundSavePageResult.SAVE_FAILED: |
393 return "SAVE_FAILED"; | 393 return "SAVE_FAILED"; |
394 case BackgroundSavePageResult.EXPIRED: | 394 case BackgroundSavePageResult.EXPIRED: |
395 return "EXPIRED"; | 395 return "EXPIRED"; |
396 case BackgroundSavePageResult.RETRY_COUNT_EXCEEDED: | 396 case BackgroundSavePageResult.RETRY_COUNT_EXCEEDED: |
397 return "RETRY_COUNT_EXCEEDED"; | 397 return "RETRY_COUNT_EXCEEDED"; |
398 case BackgroundSavePageResult.START_COUNT_EXCEEDED: | 398 case BackgroundSavePageResult.START_COUNT_EXCEEDED: |
399 return "START_COUNT_EXCEEDED"; | 399 return "START_COUNT_EXCEEDED"; |
400 case BackgroundSavePageResult.REMOVED: | 400 case BackgroundSavePageResult.USER_CANCELED: |
401 return "REMOVED"; | 401 return "USER_CANCELED"; |
402 case -1: | 402 case -1: |
403 return "NOT_COMPLETED"; | 403 return "NOT_COMPLETED"; |
404 default: | 404 default: |
405 return "UNDEFINED_STATUS"; | 405 return "UNDEFINED_STATUS"; |
406 } | 406 } |
407 } | 407 } |
408 | 408 |
409 /** | 409 /** |
410 * Get saved offline pages and align them with the metadata we got from test
ing. | 410 * Get saved offline pages and align them with the metadata we got from test
ing. |
411 */ | 411 */ |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 @Test | 543 @Test |
544 @Manual | 544 @Manual |
545 @TimeoutScale(4) | 545 @TimeoutScale(4) |
546 @CommandLineFlags.Add({"enable-features=BackgroundLoaderOfflinePagesSvelteCo
ncurrentLoading"}) | 546 @CommandLineFlags.Add({"enable-features=BackgroundLoaderOfflinePagesSvelteCo
ncurrentLoading"}) |
547 @CommandLineFlags.Remove({ | 547 @CommandLineFlags.Remove({ |
548 "disable-features=BackgroundLoaderOfflinePagesSvelteConcurrentLoadin
g"}) | 548 "disable-features=BackgroundLoaderOfflinePagesSvelteConcurrentLoadin
g"}) |
549 public void testBackgroundLoaderFailureRate() throws IOException, Interrupte
dException { | 549 public void testBackgroundLoaderFailureRate() throws IOException, Interrupte
dException { |
550 testFailureRate(); | 550 testFailureRate(); |
551 } | 551 } |
552 } | 552 } |
OLD | NEW |