summaryrefslogtreecommitdiffstats
path: root/core/tests/hosttests
diff options
context:
space:
mode:
authorNeal Nguyen <tommyn@google.com>2011-08-30 15:44:49 -0700
committerNeal Nguyen <tommyn@google.com>2011-09-08 20:05:32 -0700
commitfbfe6d971d63860c02a71d69c3c7c29a2e958734 (patch)
tree81edd97f54030ef49de2c4a5180046ac0f4322f5 /core/tests/hosttests
parent9f443fb6e70f4dafdc9610385c66425410bb3ff1 (diff)
downloadframeworks_base-fbfe6d971d63860c02a71d69c3c7c29a2e958734.zip
frameworks_base-fbfe6d971d63860c02a71d69c3c7c29a2e958734.tar.gz
frameworks_base-fbfe6d971d63860c02a71d69c3c7c29a2e958734.tar.bz2
Fixing DownloadManager Test app.
The skip notification version of waitForDownloadOrTimeout wasn't actually skipping the DownloadManager notification check. Change-Id: Iee42d9c67e63c9dc45ef5aad8ada7d34c31eeb60
Diffstat (limited to 'core/tests/hosttests')
-rw-r--r--core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerBaseTest.java10
-rw-r--r--core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerTestApp.java2
2 files changed, 6 insertions, 6 deletions
diff --git a/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerBaseTest.java b/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerBaseTest.java
index acd2a18..334661d 100644
--- a/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerBaseTest.java
+++ b/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerBaseTest.java
@@ -491,9 +491,10 @@ public class DownloadManagerBaseTest extends InstrumentationTestCase {
*
* @param id The download id to query on (wait for)
*/
- private void waitForDownloadOrTimeout_skipNotification(long id) throws TimeoutException,
+ protected void waitForDownloadOrTimeout_skipNotification(long id) throws TimeoutException,
InterruptedException {
- waitForDownloadOrTimeout(id, WAIT_FOR_DOWNLOAD_POLL_TIME, MAX_WAIT_FOR_DOWNLOAD_TIME);
+ doWaitForDownloadsOrTimeout(new Query().setFilterById(id),
+ WAIT_FOR_DOWNLOAD_POLL_TIME, MAX_WAIT_FOR_DOWNLOAD_TIME);
}
/**
@@ -505,8 +506,7 @@ public class DownloadManagerBaseTest extends InstrumentationTestCase {
*/
protected void waitForDownloadOrTimeout(long id) throws TimeoutException,
InterruptedException {
- waitForDownloadOrTimeout_skipNotification(id);
- waitForReceiverNotifications(1);
+ waitForDownloadOrTimeout(id, WAIT_FOR_DOWNLOAD_POLL_TIME, MAX_WAIT_FOR_DOWNLOAD_TIME);
}
/**
@@ -813,4 +813,4 @@ public class DownloadManagerBaseTest extends InstrumentationTestCase {
}
return cursor;
}
-} \ No newline at end of file
+}
diff --git a/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerTestApp.java b/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerTestApp.java
index ba5ee2c..654f747 100644
--- a/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerTestApp.java
+++ b/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/DownloadManagerTestApp.java
@@ -208,7 +208,7 @@ public class DownloadManagerTestApp extends DownloadManagerBaseTest {
// Wait until the download finishes; don't wait for a notification b/c
// the download may well have been completed before the last reboot.
- waitForDownloadOrTimeout(dlRequest);
+ waitForDownloadOrTimeout_skipNotification(dlRequest);
Log.i(LOG_TAG, "Verifying download information...");
// Verify specific info about the file (size, name, etc)...