Home | History | Annotate | Download | only in ui
      1 /*
      2  * Copyright (C) 2008 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 
     18 package com.android.mms.ui;
     19 
     20 import com.android.mms.R;
     21 import android.content.Context;
     22 import android.test.ActivityInstrumentationTestCase2;
     23 import android.test.suitebuilder.annotation.MediumTest;
     24 
     25 /**
     26  * Various instrumentation tests for ConversationList.
     27  *
     28  */
     29 public class ConversationListTests
     30         extends ActivityInstrumentationTestCase2<ConversationList> {
     31 
     32     private Context mContext;
     33 
     34     public ConversationListTests() {
     35         super("com.android.mms", ConversationList.class);
     36     }
     37 
     38     @Override
     39     protected void setUp() throws Exception {
     40     	super.setUp();
     41     	mContext = getInstrumentation().getTargetContext();
     42     }
     43 
     44     /**
     45      * Tests that various UI calls can be made safely even before the threads
     46      * have been loaded.  This catches various race conditions.
     47      */
     48     /* this test seems to get stuck!
     49     @MediumTest
     50     public void testUiRaceConditions() {
     51     	ConversationList a = getActivity();
     52 
     53         // menus
     54         getInstrumentation().invokeMenuActionSync(a, a.MENU_COMPOSE_NEW, 0);
     55         getInstrumentation().invokeMenuActionSync(a, a.MENU_SEARCH, 0);
     56         getInstrumentation().invokeMenuActionSync(a, a.MENU_PREFERENCES, 0);
     57         getInstrumentation().invokeMenuActionSync(a, a.MENU_DELETE_ALL, 0);
     58     }
     59     */
     60 }
     61