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

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/test/AutofillTest.java

Issue 12395028: [android] Always close Autofill popup through controller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 3 Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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.testshell; 5 package org.chromium.chrome.testshell;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.ContentProvider; 8 import android.content.ContentProvider;
9 import android.content.ContentResolver; 9 import android.content.ContentResolver;
10 import android.os.SystemClock; 10 import android.os.SystemClock;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 public boolean waitForCallback() throws InterruptedException { 87 public boolean waitForCallback() throws InterruptedException {
88 return CriteriaHelper.pollForCriteria(new Criteria() { 88 return CriteriaHelper.pollForCriteria(new Criteria() {
89 @Override 89 @Override
90 public boolean isSatisfied() { 90 public boolean isSatisfied() {
91 return mGotPopupSelection.get(); 91 return mGotPopupSelection.get();
92 } 92 }
93 }, CALLBACK_TIMEOUT_MS, CHECK_INTERVAL_MS); 93 }, CALLBACK_TIMEOUT_MS, CHECK_INTERVAL_MS);
94 } 94 }
95 95
96 @Override 96 @Override
97 public void dismissed() { 97 public void requestHide() {
98 } 98 }
99 } 99 }
100 100
101 private AutofillSuggestion[] createTwoAutofillSuggestionArray() { 101 private AutofillSuggestion[] createTwoAutofillSuggestionArray() {
102 return new AutofillSuggestion[] { 102 return new AutofillSuggestion[] {
103 new AutofillSuggestion("Sherlock Holmes", "221B Baker Street", 42), 103 new AutofillSuggestion("Sherlock Holmes", "221B Baker Street", 42),
104 new AutofillSuggestion("Arthur Dent", "West Country", 43), 104 new AutofillSuggestion("Arthur Dent", "West Country", 43),
105 }; 105 };
106 } 106 }
107 107
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 assertTrue(openAutofillPopupAndWaitUntilReady(suggestions)); 148 assertTrue(openAutofillPopupAndWaitUntilReady(suggestions));
149 assertEquals(2, mAutofillPopup.getListView().getCount()); 149 assertEquals(2, mAutofillPopup.getListView().getCount());
150 150
151 TouchCommon touchCommon = new TouchCommon(this); 151 TouchCommon touchCommon = new TouchCommon(this);
152 touchCommon.singleClickViewRelative(mAutofillPopup.getListView(), 10, 10 ); 152 touchCommon.singleClickViewRelative(mAutofillPopup.getListView(), 10, 10 );
153 assertTrue(mMockAutofillCallback.waitForCallback()); 153 assertTrue(mMockAutofillCallback.waitForCallback());
154 154
155 assertEquals(0, mMockAutofillCallback.mListIndex); 155 assertEquals(0, mMockAutofillCallback.mListIndex);
156 } 156 }
157 } 157 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698