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

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

Issue 2869843002: [Media Controls] Instrumentation test for video rotate-to-fullscreen (Closed)
Patch Set: crbug s/719560/673917/ Created 3 years, 7 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
Index: content/public/android/javatests/src/org/chromium/content/browser/VideoFullscreenOrientationLockTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/VideoFullscreenOrientationLockTest.java b/content/public/android/javatests/src/org/chromium/content/browser/VideoFullscreenOrientationLockTest.java
index 446bfb72761522a55385e421d9879bc451af84a3..489c2b3372814b9f90a5d25b41f1da0f1c43eff3 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/VideoFullscreenOrientationLockTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/VideoFullscreenOrientationLockTest.java
@@ -23,7 +23,6 @@ import org.chromium.content.browser.test.util.CriteriaHelper;
import org.chromium.content.browser.test.util.DOMUtils;
import org.chromium.content.browser.test.util.JavaScriptUtils;
import org.chromium.content.browser.test.util.UiUtils;
-import org.chromium.content.common.ContentSwitches;
import org.chromium.content_shell_apk.ContentShellActivityTestRule;
import org.chromium.media.MediaSwitches;
import org.chromium.ui.base.DeviceFormFactor;
@@ -34,10 +33,10 @@ import java.util.concurrent.TimeoutException;
/**
* Integration tests for the feature that auto locks the orientation when a video goes fullscreen.
* See also chrome layer org.chromium.chrome.browser.VideoFullscreenOrientationLockChromeTest
-ContentSwitches.ENABLE_TEST_INTENTS */
+ */
@RunWith(ContentJUnit4ClassRunner.class)
@CommandLineFlags.Add({"enable-features=VideoFullscreenOrientationLock",
- MediaSwitches.IGNORE_AUTOPLAY_RESTRICTIONS_FOR_TESTS, ContentSwitches.ENABLE_TEST_INTENTS})
+ MediaSwitches.IGNORE_AUTOPLAY_RESTRICTIONS_FOR_TESTS})
public class VideoFullscreenOrientationLockTest {
@Rule
public ContentShellActivityTestRule mActivityTestRule = new ContentShellActivityTestRule();
@@ -135,7 +134,8 @@ public class VideoFullscreenOrientationLockTest {
@MediumTest
@Feature({"VideoFullscreenOrientationLock"})
public void testEnterExitFullscreenWithControlsButton() throws Exception {
- if (DeviceFormFactor.isTablet(InstrumentationRegistry.getInstrumentation().getContext())) {
+ // TODO(johnme): Use RESTRICTION_TYPE_PHONE once crbug.com/673917 moves it out of chrome/.
+ if (DeviceFormFactor.isTablet(mActivityTestRule.getActivity())) {
return;
}
@@ -165,7 +165,8 @@ public class VideoFullscreenOrientationLockTest {
@MediumTest
@Feature({"VideoFullscreenOrientationLock"})
public void testEnterExitFullscreenWithAPI() throws Exception {
- if (DeviceFormFactor.isTablet(InstrumentationRegistry.getInstrumentation().getContext())) {
+ // TODO(johnme): Use RESTRICTION_TYPE_PHONE once crbug.com/673917 moves it out of chrome/.
+ if (DeviceFormFactor.isTablet(mActivityTestRule.getActivity())) {
return;
}
@@ -191,7 +192,8 @@ public class VideoFullscreenOrientationLockTest {
@MediumTest
@Feature({"VideoFullscreenOrientationLock"})
public void testExitFullscreenByRemovingVideo() throws Exception {
- if (DeviceFormFactor.isTablet(InstrumentationRegistry.getInstrumentation().getContext())) {
+ // TODO(johnme): Use RESTRICTION_TYPE_PHONE once crbug.com/673917 moves it out of chrome/.
+ if (DeviceFormFactor.isTablet(mActivityTestRule.getActivity())) {
return;
}
@@ -218,7 +220,8 @@ public class VideoFullscreenOrientationLockTest {
@MediumTest
@Feature({"VideoFullscreenOrientationLock"})
public void testExitFullscreenWithNavigation() throws Exception {
- if (DeviceFormFactor.isTablet(InstrumentationRegistry.getInstrumentation().getContext())) {
+ // TODO(johnme): Use RESTRICTION_TYPE_PHONE once crbug.com/673917 moves it out of chrome/.
+ if (DeviceFormFactor.isTablet(mActivityTestRule.getActivity())) {
return;
}

Powered by Google App Engine
This is Rietveld 408576698