Commit 27d82af2 authored by Peter Kotwicz's avatar Peter Kotwicz Committed by Commit Bot

Fix WebappNavigationTest.* and WebappDisplayModeTest.*

This CL enables the tests for phones but keeps them disabled for
tablets. The tests started failing as a result of
https://chromium-review.googlesource.com/c/chromium/src/+/1858605 which
made the tests incompatible with tablets

BUG=1028636

Change-Id: I76341e1684cf8587bd4c59e7deebcbb2f39df6e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1937576Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719353}
parent a79c51fd
......@@ -17,8 +17,8 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.Restriction;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeSwitches;
import org.chromium.chrome.browser.ShortcutHelper;
......@@ -29,6 +29,7 @@ import org.chromium.content_public.browser.WebContents;
import org.chromium.content_public.browser.test.util.CriteriaHelper;
import org.chromium.content_public.browser.test.util.JavaScriptUtils;
import org.chromium.content_public.browser.test.util.TouchCommon;
import org.chromium.ui.test.util.UiRestriction;
import java.util.concurrent.TimeoutException;
......@@ -90,8 +91,8 @@ public class WebappDisplayModeTest {
@Test
@SmallTest
@DisabledTest(message = "https://crbug.com/1028636")
@Feature({"Webapps"})
@Restriction(UiRestriction.RESTRICTION_TYPE_PHONE)
public void testMinimalUi() {
WebappActivity activity = startActivity(WebDisplayMode.MINIMAL_UI, "");
......
......@@ -27,8 +27,8 @@ import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.ApplicationStatus;
import org.chromium.base.CommandLine;
import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.Restriction;
import org.chromium.base.test.util.RetryOnFailure;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeFeatureList;
......@@ -60,6 +60,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils;
import org.chromium.content_public.common.ContentSwitches;
import org.chromium.net.test.EmbeddedTestServer;
import org.chromium.ui.base.PageTransition;
import org.chromium.ui.test.util.UiRestriction;
/**
* Tests web navigations originating from a WebappActivity.
......@@ -101,8 +102,8 @@ public class WebappNavigationTest {
*/
@Test
@SmallTest
@DisabledTest(message = "https://crbug.com/1028636")
@Feature({"Webapps"})
@Restriction(UiRestriction.RESTRICTION_TYPE_PHONE)
@RetryOnFailure
public void testRegularLinkOffOriginNoWebappThemeColor() throws Exception {
WebappActivity activity = runWebappActivityAndWaitForIdle(mActivityTestRule.createIntent());
......@@ -124,8 +125,8 @@ public class WebappNavigationTest {
*/
@Test
@SmallTest
@DisabledTest(message = "https://crbug.com/1028636")
@Feature({"Webapps"})
@Restriction(UiRestriction.RESTRICTION_TYPE_PHONE)
@RetryOnFailure
public void testRegularLinkOffOriginThemeColor() throws Exception {
WebappActivity activity =
......@@ -147,8 +148,8 @@ public class WebappNavigationTest {
*/
@Test
@SmallTest
@DisabledTest(message = "https://crbug.com/1028636")
@Feature({"Webapps"})
@Restriction(UiRestriction.RESTRICTION_TYPE_PHONE)
public void testRegularLinkOffOriginTwa() throws Exception {
Intent launchIntent = mActivityTestRule.createIntent().putExtra(
ShortcutHelper.EXTRA_THEME_COLOR, (long) Color.CYAN);
......@@ -176,7 +177,7 @@ public class WebappNavigationTest {
@Test
@SmallTest
@Feature({"Webapps"})
@DisabledTest(message = "https://crbug.com/1028636")
@Restriction(UiRestriction.RESTRICTION_TYPE_PHONE)
@RetryOnFailure
public void testFormSubmitOffOrigin() throws Exception {
Intent launchIntent = mActivityTestRule.createIntent().putExtra(
......@@ -261,8 +262,8 @@ public class WebappNavigationTest {
*/
@Test
@SmallTest
@DisabledTest(message = "https://crbug.com/1028636")
@Feature({"Webapps"})
@Restriction(UiRestriction.RESTRICTION_TYPE_PHONE)
@RetryOnFailure
public void testInScopeNavigationStaysInWebapp() throws Exception {
WebappActivity activity = runWebappActivityAndWaitForIdle(mActivityTestRule.createIntent());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment