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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationProviderTest.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 | « content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java ('k') | no next file » | 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/ScreenOrientationProviderTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationProviderTest.java b/content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationProviderTest.java
index 92354f1087c15123063ee782919139867e6b3295..4e711f624c1a033db4cba3838ce486ec32b039dc 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationProviderTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationProviderTest.java
@@ -4,7 +4,6 @@
package org.chromium.content.browser;
-import android.os.Build;
import android.test.suitebuilder.annotation.MediumTest;
import org.chromium.base.ThreadUtils;
@@ -87,6 +86,7 @@ public class ScreenOrientationProviderTest extends ContentShellTestBase {
@Override
public void run() {
ScreenOrientationListener.getInstance().addObserver(mObserver, activity);
+ ScreenOrientationProvider.startAccurateListening();
}
});
@@ -103,6 +103,7 @@ public class ScreenOrientationProviderTest extends ContentShellTestBase {
@Override
public void run() {
ScreenOrientationProvider.unlockOrientation();
+ ScreenOrientationProvider.startAccurateListening();
}
});
@@ -129,14 +130,6 @@ public class ScreenOrientationProviderTest extends ContentShellTestBase {
@MediumTest
@Feature({"ScreenOrientation"})
public void testPortrait() throws Exception {
- // Do not run that test for versions of Android before JB-MR1 because
- // the ScreenOrientationListener for those versions isn't accurate
- // enough. We will later simply not run that code in that version or add
- // an "accurate mode" that will fix this by polling.
- // See http://crbug.com/400158
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1)
- return;
-
lockOrientationAndWait(ScreenOrientationValues.PORTRAIT_PRIMARY);
assertTrue(checkOrientationForLock(ScreenOrientationValues.PORTRAIT_PRIMARY));
@@ -157,14 +150,6 @@ public class ScreenOrientationProviderTest extends ContentShellTestBase {
@MediumTest
@Feature({"ScreenOrientation"})
public void testLandscape() throws Exception {
- // Do not run that test for versions of Android before JB-MR1 because
- // the ScreenOrientationListener for those versions isn't accurate
- // enough. We will later simply not run that code in that version or add
- // an "accurate mode" that will fix this by polling.
- // See http://crbug.com/400158
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1)
- return;
-
lockOrientationAndWait(ScreenOrientationValues.LANDSCAPE_PRIMARY);
assertTrue(checkOrientationForLock(ScreenOrientationValues.LANDSCAPE_PRIMARY));
« no previous file with comments | « content/public/android/javatests/src/org/chromium/content/browser/ScreenOrientationListenerTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698