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
diff --git a/src/com/android/browser/WebStorageSizeManager.java b/src/com/android/browser/WebStorageSizeManager.java
index 109a02b..73a3bfb 100644
--- a/src/com/android/browser/WebStorageSizeManager.java
+++ b/src/com/android/browser/WebStorageSizeManager.java
@@ -392,10 +392,6 @@
         if(LOGV_ENABLED) {
             Log.v(LOGTAG, "scheduleOutOfSpaceNotification called.");
         }
-        if (mContext == null) {
-            // mContext can be null if we're running unit tests.
-            return;
-        }
         if ((mLastOutOfSpaceNotificationTime == -1) ||
             (System.currentTimeMillis() - mLastOutOfSpaceNotificationTime > NOTIFICATION_INTERVAL)) {
             // setup the notification boilerplate.
diff --git a/tests/src/com/android/browser/WebStorageSizeManagerUnitTests.java b/tests/src/com/android/browser/WebStorageSizeManagerUnitTests.java
index 354c4da..2beedf8 100644
--- a/tests/src/com/android/browser/WebStorageSizeManagerUnitTests.java
+++ b/tests/src/com/android/browser/WebStorageSizeManagerUnitTests.java
@@ -90,7 +90,8 @@
         // 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 @@
         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;