Home | History | Annotate | Download | only in activity
      1 /*
      2  * Copyright (C) 2006 The Android Open Source Project
      3  *
      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
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     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.
     15  */
     16 
     17 package android.app.activity;
     18 
     19 import android.content.ComponentName;
     20 import android.test.suitebuilder.annotation.LargeTest;
     21 
     22 public class LaunchTest extends ActivityTestsBase {
     23 
     24     @LargeTest
     25     public void testColdActivity() throws Exception {
     26         mIntent.putExtra("component", new ComponentName(getContext(), TestedActivity.class));
     27         runLaunchpad(LaunchpadActivity.LAUNCH);
     28     }
     29 
     30     @LargeTest
     31     public void testLocalActivity() throws Exception {
     32         mIntent.putExtra("component", new ComponentName(getContext(), LocalActivity.class));
     33         runLaunchpad(LaunchpadActivity.LAUNCH);
     34     }
     35 
     36     @LargeTest
     37     public void testColdScreen() throws Exception {
     38         mIntent.putExtra("component", new ComponentName(getContext(), TestedScreen.class));
     39         runLaunchpad(LaunchpadActivity.LAUNCH);
     40     }
     41 
     42     @LargeTest
     43     public void testLocalScreen() throws Exception {
     44         mIntent.putExtra("component", new ComponentName(getContext(), LocalScreen.class));
     45         runLaunchpad(LaunchpadActivity.LAUNCH);
     46     }
     47 
     48     @LargeTest
     49     public void testForwardResult() throws Exception {
     50         runLaunchpad(LaunchpadActivity.FORWARD_RESULT);
     51     }
     52 
     53     // The following is disabled until we can catch and recover from
     54     // application errors.
     55     public void xxtestBadParcelable() throws Exception {
     56         // All we really care about for this test is that the system
     57         // doesn't crash.
     58         runLaunchpad(LaunchpadActivity.BAD_PARCELABLE);
     59     }
     60 
     61     @LargeTest
     62     public void testClearTopInCreate() throws Exception {
     63         mIntent.putExtra("component", new ComponentName(getContext(), ClearTop.class));
     64         runLaunchpad(LaunchpadActivity.LAUNCH);
     65     }
     66 
     67     @LargeTest
     68     public void testClearTopWhileResumed() throws Exception {
     69         mIntent.putExtra("component", new ComponentName(getContext(), ClearTop.class));
     70         mIntent.putExtra(ClearTop.WAIT_CLEAR_TASK, true);
     71         runLaunchpad(LaunchpadActivity.LAUNCH);
     72     }
     73 }
     74 
     75 
     76