summaryrefslogtreecommitdiffstats
path: root/test-runner
Commit message (Collapse)AuthorAgeFilesLines
* Add new ContentProvider for doing conversions to data streams.Dianne Hackborn2010-08-082-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces basic infrastructure that should allow content providers holding complex data to perform on-demand conversion of their data to streams of various types. It is achieved through two new content provider APIs, one to interrogate the possible stream MIME types the provider can return, and the other to request a stream of data in a particular MIME type. Because implementations of this will often need to do on-demand data conversion, there is also a utility intoduced in ContentProvider for subclasses to easily run a function to write data into a pipe that is read by the client. This feature is mostly intended for cut and paste and drag and drop, as the complex data interchange allowing the source and destination to negotiate data types and copy (possible large) data between them. However because it is fundamental facility of ContentProvider, it can be used in other places, such as for more advanced GET_CONTENT data exchanges. An example implementation of this would be in ContactsProvider, which can now provider a data stream when a client opens certain pieces of it data, to return data as flat text, a vcard, or other format. Change-Id: I58627ea4ed359aa7cf2c66274adb18306c209cb2
* fix build breakageVasu Nori2010-08-042-2/+2
| | | | | | eclipse doesn't complain but our build does.. Change-Id: If0289b68e91e7eb2ae7a9b7bd90d5cb6b728e944
* add shutdown() to ContentProvider & call in ProviderTestCase*.tearDownVasu Nori2010-08-042-0/+24
| | | | Change-Id: I3dd69b6907d68b7c1184139f22297ab92337f043
* Add LoaderTestCase that makes it easier to test Loaders.Jeff Hamilton2010-07-271-0/+101
| | | | Change-Id: I4e91d6767cfd5cc61d7893e9cd71e963e42601a4
* am 243f7f85: am f6120cf4: Merge "Improve InstrumentationTestRunner exception ↵Brett Chabot2010-07-082-3/+63
|\ | | | | | | | | | | | | | | | | handling." into gingerbread Merge commit '243f7f85ea9e57716590b9cf355e55d1f0236fce' * commit '243f7f85ea9e57716590b9cf355e55d1f0236fce': Improve InstrumentationTestRunner exception handling.
| * Merge "Improve InstrumentationTestRunner exception handling." into gingerbreadBrett Chabot2010-07-082-3/+63
| |\
| | * Improve InstrumentationTestRunner exception handling.Brett Chabot2010-07-072-3/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes two somewhat related problems: - Attempting to run a method which does not exist caused a runtime exception which stopped the test run. Change this so the runner reports an individual test failure instead - A runtime exception during the test run would cause it to stop completely, with no information dumped to the logcat or stdout. Now exceptions are trapped and reported to stdout. Also added associated unit tests to test these two conditions. Related bug 2812262. Change-Id: I383f9b9bad99f14cb51071800fa9bdbf6a6a1119
* | | am 0a21801f: am a5402dab: Merge "OBB API for PackageManager" into gingerbreadKenny Root2010-07-081-0/+5
|\ \ \ | |/ / | | | | | | | | | | | | | | | Merge commit '0a21801f5fae22cd5e1b3e9f1c1405c744e24c9b' * commit '0a21801f5fae22cd5e1b3e9f1c1405c744e24c9b': OBB API for PackageManager
| * | OBB API for PackageManagerKenny Root2010-07-071-0/+5
| |/ | | | | | | | | | | | | | | | | Simple API for tracking .obb files associated with packages. Stores the path in the PackageSettings. No verification of file content is done now since the PackageManagerService can't read the SD card where these files will likely live. Change-Id: Ibeaf26ba0526b6d60f401137e58f46ee9faff39e
| * Manual merge of change 53051 from master (DO NOT MERGE)Evan Millar2010-06-181-7/+1
| | | | | | | | Change-Id: Ia4697a15cb874f25849655994e10aa88ae60b328
* | Javadoc for test case classesJoe Malin2010-06-293-118/+307
| | | | | | | | Change-Id: Ibfa035cfe9091a81fca8bd0a6c141ec26c2de139
* | Fix UnsupportedOperationException from MockContext.Makoto Onuki2010-06-041-0/+12
| | | | | | | | | | | | | | | | Added the new variant of openOrCreateDatabase to RenamingDelegatingContext too. Bug 2739822 Change-Id: I65868d0975e0a0a87ade6b5a0d625b96676af0ba
* | new API in Context. on openDatabase, new param DatabaseErrorHandlerVasu Nori2010-06-031-0/+7
| | | | | | | | | | | | | | | | | | | | | | add new method openOrCreateDatabase in Context.java to allow callers specify a DatabaseErrorHandler object to be used when database corruption occurs. add new constructor in SQLiteOpenHelper to accept DatabaseErrorHandler as an additional param to be used when SQLiteDatabase instance is created. Change-Id: I912a0202a74510f9ca0206dd8101c4abab9102ae
* | add API to Cursor to get column value typeVasu Nori2010-06-021-0/+4
| | | | | | | | Change-Id: I3ef1bcdb2eb1c45f68e829ccb6e3ecde28076591
* | Bring ServiceTestCase in line with current Service APIs and remove ↵Evan Millar2010-06-011-7/+1
| | | | | | | | | | | | | | | | | | | | unnecessary asserts. -Updated onStart() call to onStartCommand() -Removed asserts that disallowed starting an already bound service and vice versa, since that is a valid Service usage pattern. Change-Id: I79804aef5319a590c74fca54fc990954f7c3fdaa
* | Remove the unused modification APIs from MockCursor. They shouldn't have ↵Jeff Hamilton2010-05-131-70/+0
| | | | | | | | | | | | been public in the first place. Change-Id: I2932e5287f838f72acdc4c0c1fd5601ffa8c3f84
* | Moving junit out of core.jar and into core-junit.jar.Jesse Wilson2010-05-121-1/+1
| | | | | | | | Change-Id: I38b585044aaa0f0ef5a243a33d942ab0e490f8f1
* | Merge "Add test runner log when test case class is not loaded."Brett Chabot2010-04-265-1/+150
|\ \ | |/ |/|
| * Add test runner log when test case class is not loaded.Brett Chabot2010-04-235-1/+150
| | | | | | | | | | | | | | | | | | | | | | The test runner will only load TestCase classes that have a public constructor with either no params or a single String parameter. This is fairly subtle behavior and can be difficult to catch. This change adds a log message when a TestCase class is not loaded, and adds some associated unit tests. Change-Id: I6fc63e4179c949620f5773e0ae134f99905a6fb2
* | Logo attribute for manifest and PackageManager methods to fetch itAdam Powell2010-04-231-0/+20
|/ | | | Change-Id: I2c5ac44a4e2af982a616b2012901d7395013b19f
* Package manager optimizations.Dianne Hackborn2010-03-301-0/+5
| | | | | | | | | | | | | | | Addresses: Issue #2550648: PackageManagerService setComponentEnabledSetting unconditionally writes Settings xml Issue #2549084: Make PackageManager.addPermission have async version Also make the writing of settings when changing the preferred activities to use the same async mechanism, and fiddle with thread priorities in the background thread to go up to foreground priority when holding the lock to write settings and a few other places. (At some point we should really clean this up to never acquire the main lock while in the background.) Change-Id: Ib2b7632543f6fb3f92a225518579f3b2d15e1413
* Add -e package description to InstrumentationTestRunner javadoc.Brett Chabot2010-03-191-0/+4
| | | | | | Bug 2528316 Change-Id: Ic707115e40a18521e0d57ee12f43df96be7033f2
* Add missing license notices on test classesKenny Root2010-03-125-1/+81
| | | | | | | | | | | | Change number and file origin info 34691-p9 frameworks/base/test-runner/src/android/test/ProviderTestCase2.java 48099-p9 frameworks/base/test-runner/src/android/test/RenamingDelegatingContext.java 40550-p9 frameworks/base/test-runner/src/android/test/BundlePrinter.java 87783-p9 frameworks/base/test-runner/src/android/test/IsolatedContext.java 34691-p9 frameworks/base/test-runner/src/android/test/ProviderTestCase.java Change-Id: I1fea36db24e73f91ffdf43b84ff73be55478b53a
* Add "call" method on ContentProvider.Brad Fitzpatrick2010-03-052-1/+25
| | | | | | | | | | | | | This permits implementing interfaces which are faster than using remote Cursors. It then uses it for Settings & SettingProvider, which together account for ~50% of total ContentProvider event loop stalls across Froyo dogfooders. For fetching Settings this looks like it should reduce average Settings lookup from 10 ms to 0.4 ms on Sholes, once the SettingsProvider serves most gets from in-memory cache. Currently it brings the Sholes average down from 10ms to 2.5 ms while still using SQLite queries on each get.
* Bug 2306842Paul Westbrook2010-02-261-1/+61
| | | | | | | | | | | | | Since MockAccountManager was passing null to the AccountManager constructor, unit tests where the AccountManager attempts to call the AccountManagerService were crashing. Now the getAccountsByTypeAndFeatures and blockingGetAuthToken (which are the calls that the Gmail unit tests call) call a small stub At some point, all of the other AccountManager calls should be stubbed out
* fix error in javadocDoug Zongker2010-02-231-0/+1
| | | | | | The "@link LargeTest" is broken since it doesn't know where that class is. Change-Id: Ie15e40bac8a1965427e351926b2208775e79cb13
* Add ability to run tests restricted to given annotation.Brett Chabot2010-02-222-1/+126
| | | | | | | | | | And ability to exclude tests with given annotation. Also fix class cast compile warning in emma output method. Bug 2239240 Change-Id: I56273a51a8c58a690680bdb612615fab69e6e13f
* Fix code coverage output message when running tests in non-raw mode.Brett Chabot2010-02-201-1/+4
| | | | Bug 2082804
* Retry test-runner tests move.Brett Chabot2010-02-20123-1/+2456
| | | | | This time change the frameworks makefile so it only includes test-runner/src in the public API.
* Move package from internal to external and vice versa.Suchi Amalapurapu2010-02-191-0/+9
|
* Merge "Include install location preference when installing packages. Changes ↵Suchi Amalapurapu2010-02-161-8/+0
|\ | | | | | | include Add new remote call in default container service to determine install location. Rename INSTALL_ON_SDCARD Remove recommentAppInstall method Add some additional flags used in remote stubs. Move check for protected apps prior to copy. Unit tests"
| * Include install location preference when installing packages.Suchi Amalapurapu2010-02-121-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes include Add new remote call in default container service to determine install location. Rename INSTALL_ON_SDCARD Remove recommentAppInstall method Add some additional flags used in remote stubs. Move check for protected apps prior to copy. Unit tests DefaultContainerService first parses the file uri(if content uri is specified it returns a default install internal only value) and returns a recommended location. Based on which the temporary id is determined either a file name or a container id and the file is copied there. This is then later renamed during install. Todo's light weight parsing of package when determining location since we just need the install location attribute only when finding out recomended location. This will also enable to move the check for updated system apps(cannot be on sdcard) prior to copying.
* | Modify ActivityInstrumentationTestCase2 to not require hardcoded package name.Brett Chabot2010-02-122-23/+32
|/ | | | | | Deprecate old constructor. Bug 2440167
* Add APIs for mapping between new and current package names.Dianne Hackborn2010-02-111-0/+10
| | | | | | This will allow Market and others to find out what the "real" name of a package is, when it is currently running under the old name of a previously installed version.
* Fix some Gmail testsPaul Westbrook2010-02-111-0/+9
| | | | | | | | | The SSLSessionCache attempts to create a directory through the context In MockContext, this throws an UnsupportedOperationExcetion This CL changes MockContext2 in ProviderTestCase2 to allow getDir to be called, but the directory is named so it will be seperated from a directory created by a regular context
* Add new manifest option for install locationSuchi Amalapurapu2010-02-101-1/+2
| | | | | | | | | | | | Change recommendAppInstallLocation api add code to parse new attribute. Define flags in PackageInfo Add new settings attributes for enabling setting and value for install location Some tests The policy for install location: if explicitly set in manifest as internal only we try to install the app only on internal storage. if set to preferExternal, we try to install it on sdcard if possible. If not we fall back to internal. If the user enables setting SET_INSTALL_LOCATION(which will always be set to false in final release builds) and sets a prefered location, we try to honour it.
* Clean up interface between LocationManagerService and the location providers:Mike Lockwood2010-02-101-196/+0
| | | | | | | | | | | | | | | | LocationManagerService now uses new Java interface LocationProviderInterface rather than LocationProviderProxy to refer to location providers internally. LocationProviderProxy and the ILocationProvider binder interface are only used for location providers implemented as services (NetworkLocationProvider) Built-in location providers (GpsLocationProvider and mock providers) now just implement LocationProviderInterface rather than using a Binder interface and proxy object. Delete obsolete and unused TestLocationProvider class. Change-Id: Id800e7c1864f7c666f8e37125c05896493b9c8c4 Signed-off-by: Mike Lockwood <lockwood@android.com>
* New external storage APIs.Dianne Hackborn2010-02-091-0/+10
| | | | | | | | | | | This implements the spec for external storage organization, and properly reflects how the media scanner organizes the files it finds. Also includes package manager support for removing app private files from external storage when the application is uninstalled. For the new APIs and paths, the main place to look is Environment and Context.
* - change the SyncManager to retry MANUAL syncs that encounter a soft errorFred Quintana2010-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | - make the sync dump handle the case where there are no accounts - fix a bug that caused the SyncManager to burn up CPU in the system process The following was implemented: scheduler offers: - settings to disable sync - retries of certain errors - backoffs want a way to control these when scheduling a sync - "ignore_settings" - "ignore initial backoff" - "manual" : ignore settings, ignore initial backoff - "do not retry" - need to change the default behavior of not retrying manual syncs to retry regardless
* am ad9bcb22: merge from open-source masterThe Android Open Source Project2010-02-081-2/+2
|\ | | | | | | | | | | | | | | | | | | | | Merge commit 'ad9bcb22d05fbf130ac64254abd51a137e9a3d3f' * commit 'ad9bcb22d05fbf130ac64254abd51a137e9a3d3f': Fix x coordinate of the ACTION_UP event in TouchUtils.drag() method Fixed Android animation framework, for using interpolators that do not start at 0.0f Fix for GPS engines without separate session and engine status events. Be tolerant of GPS session and engine on status messages arriving out of order. GpsLocationProvider: Do not release wakelock until the GPS engine is fully off
| * merge from open-source masterThe Android Open Source Project2010-02-051-2/+2
| |\
| | * Fix x coordinate of the ACTION_UP event in TouchUtils.drag() methodMarc Capdevielle2010-02-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The ACTION_UP event was fired at the "fromX" position instead of being fired at the "toX" position which is the current value of local var "x". This bug had no real impact as the VelocityTracker always ignores the last MotionEvent when it received more than 3 events...
| | * merge from eclairJean-Baptiste Queru2009-11-1513-155/+438
| | |\
| | | * eclair snapshotJean-Baptiste Queru2009-11-1313-155/+438
| | | |
| * | | am e0cadd7c: Merge change Iffbb6e55 into eclairJack Wang2009-11-165-128/+106
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit 'e0cadd7cd811a674df62279dec00d17678b2c501' into eclair-plus-aosp * commit 'e0cadd7cd811a674df62279dec00d17678b2c501': Make perf metrics collection & output via instrumentation simpler
| * \ \ \ am e8228afb: Merge change I92cdc5ed into eclairJack Wang2009-10-301-7/+22
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit 'e8228afb2bd005ae25ce58719f9d678389b26a16' into eclair-plus-aosp * commit 'e8228afb2bd005ae25ce58719f9d678389b26a16': PerformanceCollector: Collect & report perf measurements in key/value form
* | | | | | Apps on SD card project.Oscar Montemayor2010-01-291-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactored recommendAppInstallLocation(..) method in PackageManager by making it an instance method. Since PackageManager has only abstarct instance methods, moved implementation to ApplicationContext.ApplicationPackageManager class, in line with the rest of the method implementations. Tah way, chage is consistent with best coding practices. Also MockPackageManager received the additional method.
* | | | | | am 029074ff: fix buildFred Quintana2009-12-101-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit '029074ff0fca198676997c7453cfffa932361081' into eclair-mr2-plus-aosp * commit '029074ff0fca198676997c7453cfffa932361081': fix build
* | | | | | am 563bfade: fix a build breakageFred Quintana2009-12-101-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit '563bfade6601f3410681b3cd8b069ed22af5b048' into eclair-mr2-plus-aosp * commit '563bfade6601f3410681b3cd8b069ed22af5b048': fix a build breakage
* | | | | | am 8280c2b1: Implement new MockContentProvider. Also make ContentProvider ↵Daisuke Miyakawa2009-12-042-49/+262
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aware of the class. Merge commit '8280c2b15f6875b2d387c05df23d264864eb9cd5' into eclair-mr2-plus-aosp * commit '8280c2b15f6875b2d387c05df23d264864eb9cd5': Implement new MockContentProvider. Also make ContentProvider aware of the class.