summaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
Commit message (Collapse)AuthorAgeFilesLines
* Follow MockWebServer API changes.Jeff Sharkey2013-04-031-5/+0
| | | | Change-Id: Icaba016bc6e098745e56a3b6367a8a6af0151158
* Start using MockStreamResponse.Jeff Sharkey2013-03-251-0/+5
| | | | Change-Id: Ida4a0a85883ccd6763b07e958ddc6ecf7eedf790
* Redesign of DownloadManager update loop.Jeff Sharkey2013-02-121-0/+4
| | | | | | | | | | | | | | | | | | Previously, the service lifecycle was managed through a large for() loop which was extremely tricky to reason about. This resulted in several race conditions that could leave the service running indefinitely, or terminate it early before tasks had finished. This change redesigns the update loop to be event driven based on database updates, and to collapse mutiple pending update passes. It is much easier to reason about service termination conditions, and it correctly uses startId to handle races during command delivery. Also moves scanner into isolated class, and switches to using public API instead of binding to private interface. Bug: 7638470, 7455406, 7162341 Change-Id: I380e77f5432223b2acb4e819e37f29f98ee4782b
* Migrate to using Mockito directly.Jeff Sharkey2013-01-311-1/+1
| | | | Change-Id: Ice24d5c62bbcbcfd3d7374eac3a20580f7f31f36
* Tests for max retries/redirects, ETag switches.Jeff Sharkey2013-01-291-5/+3
| | | | | | | | | | Verify that servers responding with many retries or redirects result in failed download, instead of spinning out of control. Test to verify that changed ETag results in download failing. Also fix handling of HTTP 301 to update Uri in database. Change-Id: Iff2948d79961a245b7900117d107edaa356618c9
* Clean up DownloadManager threading tests.Jeff Sharkey2013-01-081-5/+1
| | | | | | | | | | | Change runUntilStatus() methods to polling with timeout instead of requiring internal knowledge about threading. Fix notification tests, and move opening of InputStream until after handling headers to avoid FNFE. Always reset facade to defaults before each test. Change-Id: I6b2d6cfc4e685d2090c1133b1b2e89ae12760f8b
* Move notification tests to LittleMock.Jeff Sharkey2012-07-241-15/+13
| | | | | | Directly mock NotificationManager instead of using SystemFacade. Change-Id: If932d26e23816e8674469c275a828701cce5fc2d
* Migrate to shared MockWebServer.Jeff Sharkey2012-03-291-0/+272
Bug: 4726601 Change-Id: Ibe537bd5c2a092dbf974360cd454751881f7f4ea