2 * Copyright (C) 2006 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package android.app.activity;
19 import android.content.ComponentName;
20 import android.content.Intent;
21 import android.test.suitebuilder.annotation.MediumTest;
22 import android.test.suitebuilder.annotation.Suppress;
24 public class LifecycleTest extends ActivityTestsBase {
25 private Intent mTopIntent;
26 private Intent mTabIntent;
29 protected void setUp() throws Exception {
32 mTabIntent = new Intent(mContext, LaunchpadTabActivity.class);
33 mTabIntent.putExtra("tab", new ComponentName(mContext,
34 LaunchpadActivity.class));
38 public void testBasic() throws Exception {
40 runLaunchpad(LaunchpadActivity.LIFECYCLE_BASIC);
43 //Suppressing until 1285425 is fixed.
45 public void testTabBasic() throws Exception {
47 runLaunchpad(LaunchpadActivity.LIFECYCLE_BASIC);
50 //Marking flaky until bug 1164344 is fixed.
51 // @FlakyTest(tolerance=2)
53 public void testScreen() throws Exception {
55 runLaunchpad(LaunchpadActivity.LIFECYCLE_SCREEN);
58 //Marking flaky until bug 1164344 is fixed.
59 //@FlakyTest(tolerance=2)
60 //Suppressing until 1285425 is fixed.
62 public void testTabScreen() throws Exception {
64 runLaunchpad(LaunchpadActivity.LIFECYCLE_SCREEN);
67 //flaky test, removing from large suite until 1866891 is fixed
69 public void testDialog() throws Exception {
71 runLaunchpad(LaunchpadActivity.LIFECYCLE_DIALOG);
74 //Suppressing until 1285425 is fixed.
76 public void testTabDialog() throws Exception {
78 runLaunchpad(LaunchpadActivity.LIFECYCLE_DIALOG);
82 public void testFinishCreate() throws Exception {
84 runLaunchpad(LaunchpadActivity.LIFECYCLE_FINISH_CREATE);
87 //Suppressing until 1285425 is fixed.
89 public void testTabFinishCreate() throws Exception {
91 runLaunchpad(LaunchpadActivity.LIFECYCLE_FINISH_CREATE);
95 public void testFinishStart() throws Exception {
97 runLaunchpad(LaunchpadActivity.LIFECYCLE_FINISH_START);
100 //Suppressing until 1285425 is fixed.
102 public void testTabFinishStart() throws Exception {
103 mIntent = mTabIntent;
104 runLaunchpad(LaunchpadActivity.LIFECYCLE_FINISH_START);