commit | d4cedfa7539e7535451de777f6fb65775bbb85e0 | [log] [tgz] |
---|---|---|
author | Adam Momtaz <amomtaz@google.com> | Mon Mar 18 14:41:23 2013 -0700 |
committer | Adam Momtaz <amomtaz@google.com> | Mon Mar 18 16:01:52 2013 -0700 |
tree | 4ae19e2a9d1643083351b4f7136b173d0601b6ff | |
parent | eb9f3d50dd7bfb2ca0c9c729c6b731b0c990ac8f [diff] |
Fix CTS for UiAutomator device orientation in tests bug: 8399636 Change-Id: I4c07a929ffef3b4d9a49ffcdcd083bc56b143c43
diff --git a/tests/uiautomator/src/com/android/cts/uiautomatortest/CtsUiAutomatorTest.java b/tests/uiautomator/src/com/android/cts/uiautomatortest/CtsUiAutomatorTest.java index 5de9805..5885315 100644 --- a/tests/uiautomator/src/com/android/cts/uiautomatortest/CtsUiAutomatorTest.java +++ b/tests/uiautomator/src/com/android/cts/uiautomatortest/CtsUiAutomatorTest.java
@@ -787,6 +787,12 @@ * @throws UiObjectNotFoundException */ private void openTest(String name) throws UiObjectNotFoundException { + try { + UiDevice.getInstance().setOrientationNatural(); + } catch (RemoteException e) { + // will catch it in its own test. For now try to put the device + // in its natural orientation prior to each test + } UiScrollable listView = new UiScrollable( new UiSelector().className(android.widget.ListView.class.getName()));