Commit bd212bd6 authored by ortuno's avatar ortuno Committed by Commit bot

Make Chooser tests @LargeTests

Because Chooser tests interact with the UI they should be marked as
@LargeTests

> As a rule of thumb most functional UI tests are large tests.

https://developer.android.com/reference/android/support/test/filters/LargeTest.html

Also remove the flaky and disabled annotations.

BUG=646097,629579

Review-Url: https://codereview.chromium.org/2354183002
Cr-Commit-Position: refs/heads/master@{#420622}
parent f6498189
......@@ -10,7 +10,7 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.LocationManager;
import android.test.MoreAsserts;
import android.test.suitebuilder.annotation.SmallTest;
import android.test.suitebuilder.annotation.LargeTest;
import android.view.View;
import android.widget.Button;
import android.widget.ListView;
......@@ -171,7 +171,7 @@ public class BluetoothChooserDialogTest extends ChromeActivityTestCaseBase<Chrom
return message.replaceAll("</?[^>]*link[^>]*>", "");
}
@SmallTest
@LargeTest
public void testCancel() throws InterruptedException {
ItemChooserDialog itemChooser = mChooserDialog.mItemChooserDialog;
Dialog dialog = itemChooser.getDialogForTesting();
......@@ -203,7 +203,7 @@ public class BluetoothChooserDialogTest extends ChromeActivityTestCaseBase<Chrom
assertEquals("", mChooserDialog.mFinishedDeviceId);
}
@SmallTest
@LargeTest
public void testSelectItem() throws InterruptedException {
Dialog dialog = mChooserDialog.mItemChooserDialog.getDialogForTesting();
......@@ -238,7 +238,7 @@ public class BluetoothChooserDialogTest extends ChromeActivityTestCaseBase<Chrom
assertEquals("id-2", mChooserDialog.mFinishedDeviceId);
}
@SmallTest
@LargeTest
public void testNoLocationPermission() throws InterruptedException {
ItemChooserDialog itemChooser = mChooserDialog.mItemChooserDialog;
Dialog dialog = itemChooser.getDialogForTesting();
......@@ -303,7 +303,7 @@ public class BluetoothChooserDialogTest extends ChromeActivityTestCaseBase<Chrom
mChooserDialog.closeDialog();
}
@SmallTest
@LargeTest
public void testNoLocationServices() throws InterruptedException {
ItemChooserDialog itemChooser = mChooserDialog.mItemChooserDialog;
Dialog dialog = itemChooser.getDialogForTesting();
......
......@@ -5,15 +5,13 @@
package org.chromium.chrome.browser;
import android.app.Dialog;
import android.test.suitebuilder.annotation.SmallTest;
import android.test.suitebuilder.annotation.LargeTest;
import android.text.SpannableString;
import android.view.View;
import android.widget.Button;
import android.widget.ListView;
import org.chromium.base.ThreadUtils;
import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.FlakyTest;
import org.chromium.base.test.util.RetryOnFailure;
import org.chromium.chrome.R;
import org.chromium.chrome.test.ChromeActivityTestCaseBase;
......@@ -118,7 +116,7 @@ public class ItemChooserDialogTest extends ChromeActivityTestCaseBase<ChromeActi
}));
}
@SmallTest
@LargeTest
public void testSimpleItemSelection() throws InterruptedException {
Dialog dialog = mChooserDialog.getDialogForTesting();
assertTrue(dialog.isShowing());
......@@ -159,7 +157,7 @@ public class ItemChooserDialogTest extends ChromeActivityTestCaseBase<ChromeActi
mChooserDialog.dismiss();
}
@SmallTest
@LargeTest
public void testNoItemsAddedDiscoveryIdle() throws InterruptedException {
Dialog dialog = mChooserDialog.getDialogForTesting();
assertTrue(dialog.isShowing());
......@@ -187,7 +185,7 @@ public class ItemChooserDialogTest extends ChromeActivityTestCaseBase<ChromeActi
mChooserDialog.dismiss();
}
@SmallTest
@LargeTest
public void testDisabledSelection() throws InterruptedException {
Dialog dialog = mChooserDialog.getDialogForTesting();
assertTrue(dialog.isShowing());
......@@ -204,8 +202,7 @@ public class ItemChooserDialogTest extends ChromeActivityTestCaseBase<ChromeActi
mChooserDialog.dismiss();
}
@DisabledTest(message = "https://crbug.com/646097")
@SmallTest
@LargeTest
public void testAddOrUpdateItemAndRemoveItemFromList() throws InterruptedException {
Dialog dialog = mChooserDialog.getDialogForTesting();
assertTrue(dialog.isShowing());
......@@ -282,9 +279,7 @@ public class ItemChooserDialogTest extends ChromeActivityTestCaseBase<ChromeActi
mChooserDialog.dismiss();
}
@FlakyTest
// @SmallTest
// crbug.com/629579
@LargeTest
public void testAddItemWithSameNameToListAndRemoveItemFromList() throws InterruptedException {
Dialog dialog = mChooserDialog.getDialogForTesting();
assertTrue(dialog.isShowing());
......@@ -342,7 +337,7 @@ public class ItemChooserDialogTest extends ChromeActivityTestCaseBase<ChromeActi
mChooserDialog.dismiss();
}
@SmallTest
@LargeTest
public void testListHeight() throws InterruptedException {
// 500 * .3 is 150, which is 48 * 3.125. 48 * 3.5 is 168.
assertEquals(168, ItemChooserDialog.getListHeight(500, 1.0f));
......
......@@ -5,7 +5,7 @@
package org.chromium.chrome.browser;
import android.app.Dialog;
import android.test.suitebuilder.annotation.SmallTest;
import android.test.suitebuilder.annotation.LargeTest;
import android.view.View;
import android.widget.Button;
import android.widget.ListView;
......@@ -127,7 +127,7 @@ public class UsbChooserDialogTest extends ChromeActivityTestCaseBase<ChromeActiv
"</?link2>", "").replaceAll("</?link>", "");
}
@SmallTest
@LargeTest
public void testCancel() throws InterruptedException {
Dialog dialog = mChooserDialog.mItemChooserDialog.getDialogForTesting();
assertTrue(dialog.isShowing());
......@@ -149,7 +149,7 @@ public class UsbChooserDialogTest extends ChromeActivityTestCaseBase<ChromeActiv
});
}
@SmallTest
@LargeTest
public void testSelectItem() throws InterruptedException {
Dialog dialog = mChooserDialog.mItemChooserDialog.getDialogForTesting();
......
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