summaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java')
-rw-r--r--tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
index 7982ef4a..3d32ae3c 100644
--- a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
+++ b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
@@ -472,6 +472,19 @@ public class PublicApiFunctionalTest extends AbstractDownloadManagerFunctionalTe
download.runUntilStatus(DownloadManager.STATUS_SUCCESSFUL);
}
+ public void testContentObserver() throws Exception {
+ enqueueEmptyResponse(HTTP_OK);
+ enqueueRequest(getRequest());
+ mResolver.resetNotified();
+ startService(null);
+ synchronized(mResolver) {
+ if (!mResolver.mNotifyWasCalled) {
+ mResolver.wait(2000);
+ }
+ }
+ assertTrue(mResolver.mNotifyWasCalled);
+ }
+
private void runSimpleFailureTest(int expectedErrorCode) throws Exception {
Download download = enqueueRequest(getRequest());
download.runUntilStatus(DownloadManager.STATUS_FAILED);