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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillTest.java

Issue 2103243002: Factor out ContentViewAndroidDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ScopedAnchorView Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillTest.java
index f0a2a30af8241df653bae91915bf558195c6f0be..68b1b49dbd8d883c70cad6246f8e2ae278986af1 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillTest.java
@@ -5,6 +5,7 @@
package org.chromium.chrome.browser.autofill;
import android.test.suitebuilder.annotation.SmallTest;
+import android.view.View;
import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout;
@@ -54,14 +55,16 @@ public class AutofillTest extends ChromeActivityTestCaseBase<ChromeActivity> {
mMockAutofillCallback = new MockAutofillCallback();
final ViewAndroidDelegate viewDelegate =
activity.getCurrentContentViewCore().getViewAndroidDelegate();
no sievers 2016/07/18 22:14:16 This is a weird test. It's really a unit test for
Jinsuk Kim 2016/07/19 07:08:39 Marked the method with @VisibleForTesting and left
-
ThreadUtils.runOnUiThreadBlocking(new Runnable() {
@Override
public void run() {
+ View anchorView = viewDelegate.acquireView();
+ viewDelegate.setViewPosition(anchorView, 50f, 500f, 500f, 500f, 1f, 10, 10);
+
mWindowAndroid = new ActivityWindowAndroid(activity);
- mAutofillPopup = new AutofillPopup(activity, viewDelegate, mMockAutofillCallback);
+ mAutofillPopup = new AutofillPopup(activity, anchorView, 500f,
+ mMockAutofillCallback);
mAutofillPopup.filterAndShow(new AutofillSuggestion[0], false);
- mAutofillPopup.setAnchorRect(50, 500, 500, 50);
}
});
}

Powered by Google App Engine
This is Rietveld 408576698