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

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadActivityTest.java

Issue 2362473003: android: Mark flaky tests with @RetryOnFailure (Closed)
Patch Set: Created 4 years, 3 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
OLDNEW
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.download; 5 package org.chromium.chrome.browser.download;
6 6
7 import android.content.Intent; 7 import android.content.Intent;
8 import android.os.Handler; 8 import android.os.Handler;
9 import android.os.Looper; 9 import android.os.Looper;
10 import android.support.v7.widget.RecyclerView; 10 import android.support.v7.widget.RecyclerView;
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 mStubbedProvider.getDownloadDelegate().removeDownloadCallback.waitForCal lback(0); 245 mStubbedProvider.getDownloadDelegate().removeDownloadCallback.waitForCal lback(0);
246 assertEquals(1, 246 assertEquals(1,
247 mStubbedProvider.getDownloadDelegate().checkExternalCallback.get CallCount()); 247 mStubbedProvider.getDownloadDelegate().checkExternalCallback.get CallCount());
248 mStubbedProvider.getOfflinePageBridge().deleteItemCallback.waitForCallba ck(0); 248 mStubbedProvider.getOfflinePageBridge().deleteItemCallback.waitForCallba ck(0);
249 assertFalse(mStubbedProvider.getSelectionDelegate().isSelectionEnabled() ); 249 assertFalse(mStubbedProvider.getSelectionDelegate().isSelectionEnabled() );
250 assertEquals(8, mAdapter.getItemCount()); 250 assertEquals(8, mAdapter.getItemCount());
251 assertEquals("0.00 GB used", mSpaceUsedDisplay.getText()); 251 assertEquals("0.00 GB used", mSpaceUsedDisplay.getText());
252 } 252 }
253 253
254 @MediumTest 254 @MediumTest
255 @RetryOnFailure
255 public void testUndoDelete() throws Exception { 256 public void testUndoDelete() throws Exception {
256 // Adapter positions: 257 // Adapter positions:
257 // 0 = date 258 // 0 = date
258 // 1 = download item #7 259 // 1 = download item #7
259 // 2 = download item #8 260 // 2 = download item #8
260 // 3 = date 261 // 3 = date
261 // 4 = download item #6 262 // 4 = download item #6
262 // 5 = offline page #3 263 // 5 = offline page #3
263 264
264 SnackbarManager.setDurationForTesting(5000); 265 SnackbarManager.setDurationForTesting(5000);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 assertEquals(0, 324 assertEquals(0,
324 mStubbedProvider.getDownloadDelegate().removeDownloadCallback.ge tCallCount()); 325 mStubbedProvider.getDownloadDelegate().removeDownloadCallback.ge tCallCount());
325 assertEquals(0, 326 assertEquals(0,
326 mStubbedProvider.getOfflinePageBridge().deleteItemCallback.getCa llCount()); 327 mStubbedProvider.getOfflinePageBridge().deleteItemCallback.getCa llCount());
327 assertFalse(mStubbedProvider.getSelectionDelegate().isSelectionEnabled() ); 328 assertFalse(mStubbedProvider.getSelectionDelegate().isSelectionEnabled() );
328 assertEquals(14, mAdapter.getItemCount()); 329 assertEquals(14, mAdapter.getItemCount());
329 assertEquals("7.00 GB used", mSpaceUsedDisplay.getText()); 330 assertEquals("7.00 GB used", mSpaceUsedDisplay.getText());
330 } 331 }
331 332
332 @MediumTest 333 @MediumTest
334 @RetryOnFailure
333 public void testUndoDeleteDuplicatesSelected() throws Exception { 335 public void testUndoDeleteDuplicatesSelected() throws Exception {
334 // Adapter positions: 336 // Adapter positions:
335 // 0 = date 337 // 0 = date
336 // 1 = download item #7 338 // 1 = download item #7
337 // 2 = download item #8 339 // 2 = download item #8
338 // .... 340 // ....
339 341
340 SnackbarManager.setDurationForTesting(5000); 342 SnackbarManager.setDurationForTesting(5000);
341 343
342 // Add duplicate items. 344 // Add duplicate items.
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 572
571 ThreadUtils.runOnUiThread(new Runnable() { 573 ThreadUtils.runOnUiThread(new Runnable() {
572 @Override 574 @Override
573 public void run() { 575 public void run() {
574 itemView.performLongClick(); 576 itemView.performLongClick();
575 } 577 }
576 }); 578 });
577 mAdapterObserver.onSelectionCallback.waitForCallback(callCount, 1); 579 mAdapterObserver.onSelectionCallback.waitForCallback(callCount, 1);
578 } 580 }
579 } 581 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698