зеркало из https://github.com/mozilla/pjs.git
Bug 432055: applicationCache.status is 0 through the update process, patch by dcamp@mozilla.com, r+sr=jst, a=schrep
This commit is contained in:
Родитель
fbb01ec7a8
Коммит
f79bc95a3c
|
@ -99,8 +99,13 @@ function manifestUpdated()
|
|||
if (OfflineTest.setup()) {
|
||||
applicationCache.onerror = OfflineTest.failEvent;
|
||||
|
||||
applicationCache.onchecking = function() { gGotChecking = true; };
|
||||
applicationCache.ondownloading = function() { gGotDownloading = true; };
|
||||
applicationCache.onchecking = function() {
|
||||
OfflineTest.is(applicationCache.status, 2, "CHECKING state while checking");
|
||||
gGotChecking = true;
|
||||
};
|
||||
applicationCache.ondownloading = function() {
|
||||
OfflineTest.is(applicationCache.status, 3, "DOWNLOADING state while checking")
|
||||
gGotDownloading = true; };
|
||||
applicationCache.oncached = OfflineTest.priv(manifestUpdated);
|
||||
}
|
||||
|
||||
|
|
|
@ -1232,11 +1232,14 @@ nsOfflineCacheUpdate::GetStatus(PRUint16 *aStatus)
|
|||
{
|
||||
switch (mState) {
|
||||
case STATE_CHECKING :
|
||||
return nsIDOMOfflineResourceList::CHECKING;
|
||||
*aStatus = nsIDOMOfflineResourceList::CHECKING;
|
||||
return NS_OK;
|
||||
case STATE_DOWNLOADING :
|
||||
return nsIDOMOfflineResourceList::DOWNLOADING;
|
||||
*aStatus = nsIDOMOfflineResourceList::DOWNLOADING;
|
||||
return NS_OK;
|
||||
default :
|
||||
return nsIDOMOfflineResourceList::IDLE;
|
||||
*aStatus = nsIDOMOfflineResourceList::IDLE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче