am eed76b2a: Remove test for SearchManager activity context restriction.

Merge commit 'eed76b2a8ddc41af01cd3ae87c4722f3784c975c'

* commit 'eed76b2a8ddc41af01cd3ae87c4722f3784c975c':
  Remove test for SearchManager activity context restriction.
This commit is contained in:
Bjorn Bringert
2009-06-22 09:56:43 -07:00
committed by The Android Open Source Project

View File

@@ -125,26 +125,6 @@ public class SearchManagerTest extends ActivityInstrumentationTestCase2<LocalAct
assertNotNull(getSearchManagerService());
}
/**
* The goal of this test is to confirm that we can *only* obtain a search manager
* interface from an Activity context.
*/
@MediumTest
public void testSearchManagerContextRestrictions() {
SearchManager searchManager1 = (SearchManager)
mContext.getSystemService(Context.SEARCH_SERVICE);
assertNotNull(searchManager1);
Context applicationContext = mContext.getApplicationContext();
// this should fail, because you can't get a SearchManager from a non-Activity context
try {
applicationContext.getSystemService(Context.SEARCH_SERVICE);
assertFalse("Shouldn't retrieve SearchManager from a non-Activity context", true);
} catch (AndroidRuntimeException e) {
// happy here - we should catch this.
}
}
/**
* The goal of this test is to confirm that we can obtain
* a search manager at any time, and that for any given context,