summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPinyao Ting <pinyaoting@google.com>2019-09-24 15:32:18 -0700
committerPinyao Ting <pinyaoting@google.com>2019-09-30 18:34:49 +0000
commitea38c25854e87b0fe564cff465038a91f4156be2 (patch)
treec478a8bdfad287c19353f2444d95159acc0ae125 /tests
parent10b141477882a2481713d230c3473e65d9c01725 (diff)
downloadandroid_packages_apps_Trebuchet-ea38c25854e87b0fe564cff465038a91f4156be2.tar.gz
android_packages_apps_Trebuchet-ea38c25854e87b0fe564cff465038a91f4156be2.tar.bz2
android_packages_apps_Trebuchet-ea38c25854e87b0fe564cff465038a91f4156be2.zip
removed extra test protocol for unit test
Bug: 140406263 Test: run TaplTestsLauncher3 Change-Id: I73b3098bd3aa92fed41d22a94cb58fd07263d26a
Diffstat (limited to 'tests')
-rw-r--r--tests/tapl/com/android/launcher3/tapl/Workspace.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/tapl/com/android/launcher3/tapl/Workspace.java b/tests/tapl/com/android/launcher3/tapl/Workspace.java
index ad2feb4b5..0aa36ddbb 100644
--- a/tests/tapl/com/android/launcher3/tapl/Workspace.java
+++ b/tests/tapl/com/android/launcher3/tapl/Workspace.java
@@ -22,7 +22,6 @@ import static junit.framework.TestCase.assertTrue;
import android.graphics.Point;
import android.graphics.Rect;
-import android.os.Bundle;
import android.os.SystemClock;
import android.view.KeyEvent;
import android.view.MotionEvent;
@@ -124,7 +123,7 @@ public final class Workspace extends Home {
*/
public void ensureWorkspaceIsScrollable() {
final UiObject2 workspace = verifyActiveContainer();
- if (!isWorkspaceScrollable()) {
+ if (!isWorkspaceScrollable(workspace)) {
try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
"dragging icon to a second page of workspace to make it scrollable")) {
dragIconToWorkspace(
@@ -136,12 +135,12 @@ public final class Workspace extends Home {
verifyActiveContainer();
}
}
- assertTrue("Home screen workspace didn't become scrollable", isWorkspaceScrollable());
+ assertTrue("Home screen workspace didn't become scrollable",
+ isWorkspaceScrollable(workspace));
}
- private boolean isWorkspaceScrollable() {
- Bundle result = mLauncher.getTestInfo(TestProtocol.REQUEST_DOES_WORKSPACE_HAVE_SECOND_PAGE);
- return result.getBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, false);
+ private boolean isWorkspaceScrollable(UiObject2 workspace) {
+ return workspace.getChildCount() > 1;
}
@NonNull