本文整理汇总了Java中android.support.test.filters.LargeTest类的典型用法代码示例。如果您正苦于以下问题:Java LargeTest类的具体用法?Java LargeTest怎么用?Java LargeTest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LargeTest类属于android.support.test.filters包,在下文中一共展示了LargeTest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSaveAndRestorePasswordVisibility
import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testSaveAndRestorePasswordVisibility() throws Throwable {
// Type some text on the EditText
onView(withId(R.id.textinput_edittext_pwd)).perform(typeText(INPUT_TEXT));
onView(withId(R.id.textinput_password)).check(isPasswordToggledVisible(false));
// Toggle password to be shown as plain text
onView(withId(R.id.textinput_password)).perform(clickPasswordToggle());
onView(withId(R.id.textinput_password)).check(isPasswordToggledVisible(true));
RecreatableAppCompatActivity activity = activityTestRule.getActivity();
ActivityUtils.recreateActivity(activityTestRule, activity);
ActivityUtils.waitForExecution(activityTestRule);
// Check that the password is still toggled to be shown as plain text
onView(withId(R.id.textinput_password)).check(isPasswordToggledVisible(true));
}
示例2: checkProfileTest
import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void checkProfileTest() throws InterruptedException{
Thread.sleep(6000);
mFireBaseDatabase = FirebaseDatabase.getInstance();
mUsersDatabaseReference = mFireBaseDatabase.getReference().child("users");
FirebaseApp.initializeApp(rule.getActivity());
mAuth = FirebaseAuth.getInstance();
Looper.prepare();
final MainActivity obj = new MainActivity();
if(mAuth.getCurrentUser() != null){
final String user_id = mAuth.getCurrentUser().getUid();
mUsersDatabaseReference.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
if(!dataSnapshot.hasChild(user_id)){
obj.startActivity(new Intent(obj.getApplicationContext(), CreateProfileActivity.class));
obj.finish();
}
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});
}
Thread.sleep(4000);
}
示例3: verifySilenceDuringPresentationStoring
import android.support.test.filters.LargeTest; //导入依赖的package包/类
/**
* Verify that the "Silence during presentation" setting is correctly stored and restored
* on activity loading.
*
* @throws InterruptedException If sleep times fail
*/
@Test
@LargeTest
@RequiresDevice
public void verifySilenceDuringPresentationStoring() throws InterruptedException {
onView(withId(R.id.silenceDuringPresentation))
.perform(click());
Thread.sleep(1000);
onView(withId(R.id.silenceDuringPresentation))
.check(matches(isChecked()));
settingsActivityRule.getActivity().onStop();
settingsActivityRule.getActivity().finish();
Thread.sleep(1000);
assertThat(settingsActivityRule.getActivity().isDestroyed(), is(true));
settingsActivityRule.launchActivity(null);
onView(withId(R.id.silenceDuringPresentation))
.check(matches(isChecked()))
.perform(click());
Thread.sleep(1000);
onView(withId(R.id.silenceDuringPresentation))
.check(matches(isNotChecked()));
settingsActivityRule.getActivity().onStop();
settingsActivityRule.getActivity().finish();
Thread.sleep(1000);
assertThat(settingsActivityRule.getActivity().isDestroyed(), is(true));
settingsActivityRule.launchActivity(null);
onView(withId(R.id.silenceDuringPresentation)).check(matches(isNotChecked()));
}
示例4: verifyUseVolumeKeysForNavigationStoring
import android.support.test.filters.LargeTest; //导入依赖的package包/类
/**
* Verify that the "Use volume keys for navigation" setting is correctly stored and restored
* on activity loading.
*
* @throws InterruptedException If sleep times fail
*/
@Test
@LargeTest
@RequiresDevice
public void verifyUseVolumeKeysForNavigationStoring() throws InterruptedException {
onView(withId(R.id.useVolumeKeysForNavigation))
.perform(click());
Thread.sleep(1000);
onView(withId(R.id.useVolumeKeysForNavigation))
.check(matches(isNotChecked()));
settingsActivityRule.getActivity().onStop();
settingsActivityRule.getActivity().finish();
Thread.sleep(1000);
assertThat(settingsActivityRule.getActivity().isDestroyed(), is(true));
settingsActivityRule.launchActivity(null);
onView(withId(R.id.useVolumeKeysForNavigation))
.check(matches(isNotChecked()))
.perform(click());
Thread.sleep(1000);
onView(withId(R.id.useVolumeKeysForNavigation))
.check(matches(isChecked()));
settingsActivityRule.getActivity().onStop();
settingsActivityRule.getActivity().finish();
Thread.sleep(1000);
assertThat(settingsActivityRule.getActivity().isDestroyed(), is(true));
settingsActivityRule.launchActivity(null);
onView(withId(R.id.useVolumeKeysForNavigation)).check(matches(isChecked()));
}
示例5: testLargeTest
import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testLargeTest() {
Log.d("Test Filters", "This is a large test");
Activity activity = activityTestRule.getActivity();
assertNotNull("MainActivity is not available", activity);
}
示例6: testBasicContent
import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testBasicContent() throws Throwable {
// Verify different combinations of snackbar content (title / subtitle and action)
// and duration
// Short duration
verifySnackbarContent(
makeCustomSnackbar()
.setTitle(TITLE_TEXT)
.setSubtitle(SUBTITLE_TEXT)
.setDuration(Snackbar.LENGTH_SHORT),
TITLE_TEXT,
SUBTITLE_TEXT);
// Long duration
verifySnackbarContent(
makeCustomSnackbar()
.setTitle(TITLE_TEXT)
.setSubtitle(SUBTITLE_TEXT)
.setDuration(Snackbar.LENGTH_LONG),
TITLE_TEXT,
SUBTITLE_TEXT);
// Indefinite duration
verifySnackbarContent(
makeCustomSnackbar()
.setTitle(TITLE_TEXT)
.setSubtitle(SUBTITLE_TEXT)
.setDuration(Snackbar.LENGTH_INDEFINITE),
TITLE_TEXT,
SUBTITLE_TEXT);
}
示例7: testMinMaxTabWidth
import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testMinMaxTabWidth() {
verifyMinMaxTabWidth(
R.layout.tab_layout_bound_minmax,
R.dimen.tab_width_limit_small,
R.dimen.tab_width_limit_large);
}
开发者ID:material-components,项目名称:material-components-android,代码行数:9,代码来源:TabLayoutWithViewPagerTest.java
示例8: testStopRestartVideoSource
import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testStopRestartVideoSource() throws InterruptedException {
fixtures.stopRestartVideoSource();
}
示例9: testStartStopWithDifferentResolutions
import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testStartStopWithDifferentResolutions() throws InterruptedException {
fixtures.startStopWithDifferentResolutions();
}
示例10: testReturnBufferLate
import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testReturnBufferLate() throws InterruptedException {
fixtures.returnBufferLate();
}
示例11: testCameraFreezedEventOnBufferStarvation
import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testCameraFreezedEventOnBufferStarvation() throws InterruptedException {
fixtures.cameraFreezedEventOnBufferStarvation();
}
示例12: testStartWhileCameraIsAlreadyOpen
import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testStartWhileCameraIsAlreadyOpen() throws InterruptedException {
fixtures.startWhileCameraIsAlreadyOpen();
}
示例13: testStartWhileCameraIsAlreadyOpenAndCloseCamera
import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testStartWhileCameraIsAlreadyOpenAndCloseCamera() throws InterruptedException {
fixtures.startWhileCameraIsAlreadyOpenAndCloseCamera();
}
示例14: testMinTabWidth
import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testMinTabWidth() {
verifyMinMaxTabWidth(R.layout.tab_layout_bound_min, R.dimen.tab_width_limit_medium, 0);
}
开发者ID:material-components,项目名称:material-components-android,代码行数:6,代码来源:TabLayoutWithViewPagerTest.java
示例15: testMaxTabWidth
import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testMaxTabWidth() {
verifyMinMaxTabWidth(R.layout.tab_layout_bound_max, 0, R.dimen.tab_width_limit_medium);
}
开发者ID:material-components,项目名称:material-components-android,代码行数:6,代码来源:TabLayoutWithViewPagerTest.java