summaryrefslogtreecommitdiff
path: root/chromium/weblayer/public/javatestutil
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/weblayer/public/javatestutil
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/weblayer/public/javatestutil')
-rw-r--r--chromium/weblayer/public/javatestutil/BUILD.gn1
-rw-r--r--chromium/weblayer/public/javatestutil/org/chromium/weblayer/TestWebLayer.java39
2 files changed, 40 insertions, 0 deletions
diff --git a/chromium/weblayer/public/javatestutil/BUILD.gn b/chromium/weblayer/public/javatestutil/BUILD.gn
index 48b69a71639..5fd626da668 100644
--- a/chromium/weblayer/public/javatestutil/BUILD.gn
+++ b/chromium/weblayer/public/javatestutil/BUILD.gn
@@ -12,6 +12,7 @@ android_library("test_java") {
deps = [
"//base:base_java_test_support",
"//third_party/junit:junit",
+ "//weblayer/browser/java:interfaces_java",
"//weblayer/browser/java:test_java",
"//weblayer/public/java",
]
diff --git a/chromium/weblayer/public/javatestutil/org/chromium/weblayer/TestWebLayer.java b/chromium/weblayer/public/javatestutil/org/chromium/weblayer/TestWebLayer.java
index 370103f4fab..1623a9e7906 100644
--- a/chromium/weblayer/public/javatestutil/org/chromium/weblayer/TestWebLayer.java
+++ b/chromium/weblayer/public/javatestutil/org/chromium/weblayer/TestWebLayer.java
@@ -9,10 +9,12 @@ import android.content.pm.PackageManager;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.AndroidRuntimeException;
+import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import org.chromium.weblayer_private.interfaces.ObjectWrapper;
import org.chromium.weblayer_private.test_interfaces.ITestWebLayer;
/**
@@ -75,4 +77,41 @@ public final class TestWebLayer {
public void setSystemLocationSettingEnabled(boolean enabled) throws RemoteException {
mITestWebLayer.setSystemLocationSettingEnabled(enabled);
}
+
+ // Runs |runnable| when cc::RenderFrameMetadata's |top_controls_height| and
+ // |bottom_controls_height| matches the supplied values. |runnable| may be run synchronously.
+ public void waitForBrowserControlsMetadataState(Tab tab, int top, int bottom, Runnable runnable)
+ throws RemoteException {
+ mITestWebLayer.waitForBrowserControlsMetadataState(
+ tab.getITab(), top, bottom, ObjectWrapper.wrap(runnable));
+ }
+
+ public void setAccessibilityEnabled(boolean enabled) throws RemoteException {
+ mITestWebLayer.setAccessibilityEnabled(enabled);
+ }
+
+ public boolean canBrowserControlsScroll(Tab tab) throws RemoteException {
+ return mITestWebLayer.canBrowserControlsScroll(tab.getITab());
+ }
+
+ public void addInfoBar(Tab tab, Runnable runnable) throws RemoteException {
+ mITestWebLayer.addInfoBar(tab.getITab(), ObjectWrapper.wrap(runnable));
+ }
+
+ public View getInfoBarContainerView(Tab tab) throws RemoteException {
+ return (View) ObjectWrapper.unwrap(
+ mITestWebLayer.getInfoBarContainerView(tab.getITab()), View.class);
+ }
+
+ public void setIgnoreMissingKeyForTranslateManager(boolean ignore) throws RemoteException {
+ mITestWebLayer.setIgnoreMissingKeyForTranslateManager(ignore);
+ }
+
+ public void forceNetworkConnectivityState(boolean networkAvailable) throws RemoteException {
+ mITestWebLayer.forceNetworkConnectivityState(networkAvailable);
+ }
+
+ public boolean canInfoBarContainerScroll(Tab tab) throws RemoteException {
+ return mITestWebLayer.canInfoBarContainerScroll(tab.getITab());
+ }
}