summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBjorn Bringert <bringert@android.com>2009-04-29 14:56:12 +0100
committerBjorn Bringert <bringert@android.com>2009-04-29 20:23:04 +0100
commit6d72e029cb6e5a9cf26aa3314c3dca83614fc91b (patch)
treee27689851b8c23701a6ee3e66ebbfecd86fc4b6c /tests
parentaece7c6723b1a227f6f57db4fde0c1bdd50acf78 (diff)
downloadframeworks_base-6d72e029cb6e5a9cf26aa3314c3dca83614fc91b.zip
frameworks_base-6d72e029cb6e5a9cf26aa3314c3dca83614fc91b.tar.gz
frameworks_base-6d72e029cb6e5a9cf26aa3314c3dca83614fc91b.tar.bz2
Add 'includeInGlobalSearch' attribute to searchable meta-data.
The attribute is not yet public. Also adds a SearchManager method for listing all searchables that can be included in global search. This is the framework part of http://b/issue?id=1819651
Diffstat (limited to 'tests')
-rw-r--r--tests/AndroidTests/src/com/android/unit_tests/SearchablesTest.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/AndroidTests/src/com/android/unit_tests/SearchablesTest.java b/tests/AndroidTests/src/com/android/unit_tests/SearchablesTest.java
index cdbe98b..743c979 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/SearchablesTest.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/SearchablesTest.java
@@ -153,6 +153,8 @@ public class SearchablesTest extends AndroidTestCase {
int count = searchablesList.size();
assertTrue(count >= 1); // this isn't really a unit test
checkSearchables(searchablesList);
+ ArrayList<SearchableInfo> global = searchables.getSearchablesInGlobalSearchList();
+ checkSearchables(global);
}
/**
@@ -166,10 +168,10 @@ public class SearchablesTest extends AndroidTestCase {
Searchables searchables = new Searchables(mockContext);
searchables.buildSearchableList();
ArrayList<SearchableInfo> searchablesList = searchables.getSearchablesList();
- if (searchablesList != null) {
- int count = searchablesList.size();
- assertTrue(count == 0);
- }
+ assertNotNull(searchablesList);
+ MoreAsserts.assertEmpty(searchablesList);
+ ArrayList<SearchableInfo> global = searchables.getSearchablesInGlobalSearchList();
+ MoreAsserts.assertEmpty(global);
}
/**