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

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

Issue 1903533002: Change FlakyTest from android.test.FlakyTest to our version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | content/public/android/javatests/src/org/chromium/content/browser/NavigationTest.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.download; 5 package org.chromium.chrome.browser.download;
6 6
7 import android.os.Environment; 7 import android.os.Environment;
8 import android.test.FlakyTest;
9 import android.test.suitebuilder.annotation.MediumTest; 8 import android.test.suitebuilder.annotation.MediumTest;
10 import android.view.View; 9 import android.view.View;
11 10
12 import org.chromium.base.Log; 11 import org.chromium.base.Log;
13 import org.chromium.base.test.util.CommandLineFlags; 12 import org.chromium.base.test.util.CommandLineFlags;
14 import org.chromium.base.test.util.DisabledTest; 13 import org.chromium.base.test.util.DisabledTest;
15 import org.chromium.base.test.util.Feature; 14 import org.chromium.base.test.util.Feature;
15 import org.chromium.base.test.util.FlakyTest;
16 import org.chromium.chrome.R; 16 import org.chromium.chrome.R;
17 import org.chromium.chrome.browser.ChromeSwitches; 17 import org.chromium.chrome.browser.ChromeSwitches;
18 import org.chromium.chrome.browser.compositor.CompositorViewHolder; 18 import org.chromium.chrome.browser.compositor.CompositorViewHolder;
19 import org.chromium.chrome.browser.compositor.layouts.LayoutManager; 19 import org.chromium.chrome.browser.compositor.layouts.LayoutManager;
20 import org.chromium.chrome.browser.compositor.layouts.StaticLayout; 20 import org.chromium.chrome.browser.compositor.layouts.StaticLayout;
21 import org.chromium.chrome.browser.infobar.InfoBarContainer; 21 import org.chromium.chrome.browser.infobar.InfoBarContainer;
22 import org.chromium.chrome.browser.tabmodel.TabModel; 22 import org.chromium.chrome.browser.tabmodel.TabModel;
23 import org.chromium.chrome.browser.tabmodel.TabModelUtils; 23 import org.chromium.chrome.browser.tabmodel.TabModelUtils;
24 import org.chromium.chrome.test.util.InfoBarUtil; 24 import org.chromium.chrome.test.util.InfoBarUtil;
25 import org.chromium.content.browser.test.util.Criteria; 25 import org.chromium.content.browser.test.util.Criteria;
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 assertTrue("Missing first download", hasDownload("superbo.txt", SUPERBO_ CONTENTS)); 196 assertTrue("Missing first download", hasDownload("superbo.txt", SUPERBO_ CONTENTS));
197 assertTrue("Missing second download", 197 assertTrue("Missing second download",
198 hasDownload("superbo (1).txt", SUPERBO_CONTENTS)); 198 hasDownload("superbo (1).txt", SUPERBO_CONTENTS));
199 } 199 }
200 200
201 /* 201 /*
202 Bug http://crbug/415711 202 Bug http://crbug/415711
203 */ 203 */
204 @MediumTest 204 @MediumTest
205 @Feature({"Downloads"}) 205 @Feature({"Downloads"})
206 @FlakyTest 206 @FlakyTest
mikecase (-- gone --) 2016/04/19 19:07:08 Change @FlakyTest to... @FlakyTest(message = "crb
207 public void testDuplicateHttpPostDownload_Dismiss() throws Exception { 207 public void testDuplicateHttpPostDownload_Dismiss() throws Exception {
208 // Download a file. 208 // Download a file.
209 loadUrl(mTestServer.getURL("/chrome/test/data/android/download/post.html ")); 209 loadUrl(mTestServer.getURL("/chrome/test/data/android/download/post.html "));
210 waitForFocus(); 210 waitForFocus();
211 View currentView = getActivity().getActivityTab().getView(); 211 View currentView = getActivity().getActivityTab().getView();
212 int callCount = getChromeDownloadCallCount(); 212 int callCount = getChromeDownloadCallCount();
213 singleClickView(currentView); 213 singleClickView(currentView);
214 assertTrue("Failed to finish downloading file for the first time.", 214 assertTrue("Failed to finish downloading file for the first time.",
215 waitForChromeDownloadToFinish(callCount)); 215 waitForChromeDownloadToFinish(callCount));
216 216
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 CriteriaHelper.pollUiThread(new Criteria() { 402 CriteriaHelper.pollUiThread(new Criteria() {
403 @Override 403 @Override
404 public boolean isSatisfied() { 404 public boolean isSatisfied() {
405 updateFailureReason("There should be " + size + " infobar but th ere are " 405 updateFailureReason("There should be " + size + " infobar but th ere are "
406 + getInfoBars().size() + " infobars."); 406 + getInfoBars().size() + " infobars.");
407 return getInfoBars().size() == size && !container.isAnimating(); 407 return getInfoBars().size() == size && !container.isAnimating();
408 } 408 }
409 }); 409 });
410 } 410 }
411 } 411 }
OLDNEW
« no previous file with comments | « no previous file | content/public/android/javatests/src/org/chromium/content/browser/NavigationTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698