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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java

Issue 449833002: Test Screen Orientation polling for Android 4.0/4.1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@android_poll
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationProviderTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java b/content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java
index 153e0af321d814fa8283e080bcc555324f9f09f7..907df4c03effd2ff59c00ab3026a5e9cca92566f 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java
@@ -5,7 +5,6 @@
package org.chromium.content.browser;
import android.content.pm.ActivityInfo;
-import android.os.Build;
import android.test.suitebuilder.annotation.MediumTest;
import org.chromium.base.ThreadUtils;
@@ -82,6 +81,7 @@ public class ScreenOrientationListenerTest extends ContentShellTestBase {
@Override
public void run() {
ScreenOrientationListener.getInstance().addObserver(mObserver, activity);
+ ScreenOrientationListener.getInstance().startAccurateListening();
}
});
@@ -95,6 +95,7 @@ public class ScreenOrientationListenerTest extends ContentShellTestBase {
@Override
public void run() {
getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
+ ScreenOrientationListener.getInstance().startAccurateListening();
}
});
@@ -122,13 +123,6 @@ public class ScreenOrientationListenerTest extends ContentShellTestBase {
@MediumTest
@Feature({"ScreenOrientation"})
public void testFlipPortrait() throws Exception {
- // This can't work for pre JB-MR1 SDKs for the moment. We will whether
- // disable the feature entirely on that platform or add an "accurate"
- // mode.
- // See http://crbug.com/400158
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1)
- return;
-
lockOrientationAndWait(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
assertEquals(0, mObserver.mOrientation);
@@ -140,13 +134,6 @@ public class ScreenOrientationListenerTest extends ContentShellTestBase {
@MediumTest
@Feature({"ScreenOrientation"})
public void testFlipLandscape() throws Exception {
- // This can't work for pre JB-MR1 SDKs for the moment. We will whether
- // disable the feature entirely on that platform or add an "accurate"
- // mode.
- // See http://crbug.com/400158
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1)
- return;
-
lockOrientationAndWait(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
assertEquals(90, mObserver.mOrientation);
« no previous file with comments | « no previous file | content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationProviderTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698