summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-09-15 12:47:48 +0100
committerBen Murdoch <benm@google.com>2011-09-15 13:00:43 +0100
commit327e3ac66da7b67dadf16e93dc3a8bb5ecf0efd0 (patch)
tree95bcec242cdc6b78d81148c17981d196492742c5 /tests
parentef4a243155bec06dfa88039e3b76f5709f014993 (diff)
downloadpackages_apps_Browser-327e3ac66da7b67dadf16e93dc3a8bb5ecf0efd0.tar.gz
packages_apps_Browser-327e3ac66da7b67dadf16e93dc3a8bb5ecf0efd0.tar.bz2
packages_apps_Browser-327e3ac66da7b67dadf16e93dc3a8bb5ecf0efd0.zip
Fix WebStorageSizeManagerUnitTest NPE
Previously we passed a null Context into the WebStorageSizeManager from the unit test. After the refactoring to get the application context from the passed in Context, this no longer works. So pass in a valid Context. (See Ib0be5f8c for the regression) Bug: 5319628 Change-Id: I691e2edb0a4174076c7599525569d104a83d3442
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/browser/WebStorageSizeManagerUnitTests.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/src/com/android/browser/WebStorageSizeManagerUnitTests.java b/tests/src/com/android/browser/WebStorageSizeManagerUnitTests.java
index 354c4da38..2beedf8b5 100644
--- a/tests/src/com/android/browser/WebStorageSizeManagerUnitTests.java
+++ b/tests/src/com/android/browser/WebStorageSizeManagerUnitTests.java
@@ -90,7 +90,8 @@ public class WebStorageSizeManagerUnitTests extends AndroidTestCase {
// We have an appcache file size of 0 MB.
mAppCacheInfo.setAppCacheSizeBytes(0);
// Create the manager.
- WebStorageSizeManager manager = new WebStorageSizeManager(null, mDiskInfo, mAppCacheInfo);
+ WebStorageSizeManager manager = new WebStorageSizeManager(getContext(), mDiskInfo,
+ mAppCacheInfo);
// We add origin 1.
long origin1Quota = 0;
long origin1EstimatedSize = bytes(3.5);
@@ -247,7 +248,8 @@ public class WebStorageSizeManagerUnitTests extends AndroidTestCase {
mAppCacheInfo.setAppCacheSizeBytes(0);
// Create the manager.
- WebStorageSizeManager manager = new WebStorageSizeManager(null, mDiskInfo, mAppCacheInfo);
+ WebStorageSizeManager manager = new WebStorageSizeManager(getContext(), mDiskInfo,
+ mAppCacheInfo);
// We add an origin.
long originQuota = 0;