summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Muramatsu <btmura@android.com>2011-02-22 16:07:33 -0800
committerAndroid Code Review <code-review@android.com>2011-02-22 16:07:33 -0800
commitdbf9d6b4c090b632e0f6608de8d01e7508435bdd (patch)
treedf9070bdaee340eca3f385556d6f9415c8be1328
parentf1cdaa256a89f9b9806989b52607deb365fa0fcd (diff)
parent90872394e2a3fbce9bfab0bc7e9aa4dba3c4c715 (diff)
downloadcts-eclair.tar.gz
Merge "Adding waitForIdleSync in testTouchMode." into eclaireclair
-rw-r--r--tests/tests/view/src/android/view/cts/ViewTest.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/tests/view/src/android/view/cts/ViewTest.java b/tests/tests/view/src/android/view/cts/ViewTest.java
index 3b9d751027a..726b0f732c3 100644
--- a/tests/tests/view/src/android/view/cts/ViewTest.java
+++ b/tests/tests/view/src/android/view/cts/ViewTest.java
@@ -3936,6 +3936,7 @@ public class ViewTest extends ActivityInstrumentationTestCase2<ViewTestStubActiv
fitWindowsView.requestFocus();
}
});
+ getInstrumentation().waitForIdleSync();
assertTrue(mockView.isFocusableInTouchMode());
assertFalse(fitWindowsView.isFocusableInTouchMode());
assertTrue(mockView.isFocusable());
@@ -3953,12 +3954,14 @@ public class ViewTest extends ActivityInstrumentationTestCase2<ViewTestStubActiv
mockView.requestFocus();
}
});
+ getInstrumentation().waitForIdleSync();
assertTrue(mockView.isFocused());
runTestOnUiThread(new Runnable() {
public void run() {
fitWindowsView.requestFocus();
}
});
+ getInstrumentation().waitForIdleSync();
assertFalse(fitWindowsView.isFocused());
assertTrue(mockView.isInTouchMode());
assertTrue(fitWindowsView.isInTouchMode());
@@ -3972,6 +3975,7 @@ public class ViewTest extends ActivityInstrumentationTestCase2<ViewTestStubActiv
fitWindowsView.requestFocus();
}
});
+ getInstrumentation().waitForIdleSync();
assertFalse(mockView.isFocused());
assertTrue(fitWindowsView.isFocused());
assertFalse(mockView.isInTouchMode());