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

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillTestHelper.java

Issue 2680143002: Use dropdown list for admin areas in pr form. (Closed)
Patch Set: Touch ups Created 3 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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.autofill; 5 package org.chromium.chrome.browser.autofill;
6 6
7 import org.chromium.base.ThreadUtils; 7 import org.chromium.base.ThreadUtils;
8 import org.chromium.base.test.util.CallbackHelper; 8 import org.chromium.base.test.util.CallbackHelper;
9 import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; 9 import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile;
10 import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; 10 import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard;
(...skipping 13 matching lines...) Expand all
24 24
25 public AutofillTestHelper() { 25 public AutofillTestHelper() {
26 registerDataObserver(); 26 registerDataObserver();
27 setNormalizationTimeoutForTesting(); 27 setNormalizationTimeoutForTesting();
28 } 28 }
29 29
30 void setNormalizationTimeoutForTesting() { 30 void setNormalizationTimeoutForTesting() {
31 ThreadUtils.runOnUiThreadBlocking(new Runnable() { 31 ThreadUtils.runOnUiThreadBlocking(new Runnable() {
32 @Override 32 @Override
33 public void run() { 33 public void run() {
34 PersonalDataManager.getInstance().setNormalizationTimeoutForTest ing(1); 34 PersonalDataManager.getInstance().setLoadingTimeoutForTesting(1) ;
35 } 35 }
36 }); 36 });
37 } 37 }
38 38
39 AutofillProfile getProfile(final String guid) throws ExecutionException { 39 AutofillProfile getProfile(final String guid) throws ExecutionException {
40 return ThreadUtils.runOnUiThreadBlocking(new Callable<AutofillProfile>() { 40 return ThreadUtils.runOnUiThreadBlocking(new Callable<AutofillProfile>() {
41 @Override 41 @Override
42 public AutofillProfile call() { 42 public AutofillProfile call() {
43 return PersonalDataManager.getInstance().getProfile(guid); 43 return PersonalDataManager.getInstance().getProfile(guid);
44 } 44 }
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 }); 350 });
351 } 351 }
352 }); 352 });
353 if (isDataLoaded) return; 353 if (isDataLoaded) return;
354 mOnPersonalDataChangedHelper.waitForCallback(callCount); 354 mOnPersonalDataChangedHelper.waitForCallback(callCount);
355 } catch (TimeoutException | InterruptedException | ExecutionException e) { 355 } catch (TimeoutException | InterruptedException | ExecutionException e) {
356 throw new AssertionError(e); 356 throw new AssertionError(e);
357 } 357 }
358 } 358 }
359 } 359 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698