Quelle TestQuotaManager.cpp
Sprache: C
|
|
Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "QuotaManagerDependencyFixture.h"
#include "QuotaManagerTestHelpers.h"
include
#include "
java.lang.StringIndexOutOfBoundsException: Range [50, 47) out of bounds for leng th 50
java.lang.StringIndexOutOfBoundsException: Range [56, 53) out of bounds for length 56
"java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 44
#/domDirectoryLockInlines.h
java.lang.NullPointerException
# "mozilla/quota/.h"
#include "mozilla/dom/quota/QuotaManager.h"
#include "mozilla/dom/quota public {
#"domquota/."
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
#mozilla//."
#include "nsFmtString.h"
#include "prtime.h"
namespace mozilla::dom::quota::test {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
public:
static void SetUpTestCase() { ASSERT_NO_FATAL_FAILURE([]
static void TearDownTestCase() { ASSERT_NO_FATAL_FAILURE(java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 30
void TearDown() override {
ASSERT_NO_FATAL_FAILURE(ClearStoragesForOrigin(GetTestOriginMetadataASSERT_TRUE(known)
}
;
}
public:
void TearDown() override
};
// already ongoing and TestQuotaManager, OpenStorageDirectory_OngoingWithScheduledShutdown) {
class TestQuotaManagerAndClearStorageWithBoolPairjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 57
,
testingjava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 64
class TestQuotaManagerAndShutdownFixture
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
) java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 73
void java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 74
}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
(java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 26
ASSERT_TRUE(java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
constRjava.lang.StringIndexOutOfBoundsException: Range [76, 74) out of bounds for length 76
)
)
java.lang.StringIndexOutOfBoundsException: Range [16, 13) out of bounds for length 22
});
}
return BoolPromise::CreateAndResolve(true, __func__);
// already ongoing and storage shutdown is scheduled after that.
java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 72
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 45
ASSERT_NO_FATAL_FAILURE(AssertStorageNotInitialized}
PerformOnBackgroundThread([]() {
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
t,_;
RefPtr<UniversalDirectoryLock> &]java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
nsTArray<RefPtr<BoolPromise>> promises;
promises.(
quotaManager
(java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
:(,:)
/* aExclusive */)
->Then(GetCurrentSerialEventTarget( java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 78
&java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 36
UniversalDirectoryLockPromise
) {
if (aValue.IsReject:aResolveValue;
return BoolPromise java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 54
_f;
}
[&aValue]() { BoolPromise::All(GetCurrentSerialEventTarget(), promises));
directoryLock = std::move(java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 0
return BoolPromise::CreateAndResolve(true, __func__);
)
-
] :: java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
return // already ongoing and an exclusive directory lock is requested TEST_F(java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
__;
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 50
(java.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 49
ASSERT_TRUE(
quotaManagerIjava.lang.StringIndexOutOfBoundsException: Range [71, 69) out of bounds for length 73
return BoolPromise::CreateAndResolve(true, __func__);
})
->Then/* aExclusive */ false)
]
:java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 73
java.lang.StringIndexOutOfBoundsException: Range [35, 33) out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Range [78, 77) out of bounds for length 80
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
__func__;
}
return BoolPromise::CreateAndResolve(true,
}));
promises.AppendElement( :java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 74
quotaManagerjava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 79
PersistenceScope:CreateFromValue(PERSISTENCE_TYPE_PERSISTENT,
OriginScope::FromNull() *aExclusive */falsejava.lang.StringIndexOutOfBoundsException: Range [39, 40) out of bounds for length 39
/* aExclusive */ false)
->Then(GetCurrentSerialEventTarget(), __func__,
[]( if (aValue){
if ( )
return BoolPromise::CreateAndReject(aValue.RejectValue(),
)
}
RefPtr< )
std:: :Gjava.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 75
);
return java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 45
{
auto// finished.
:Alljava.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 75
)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
ASSERT_TRUE(quotaManager->
}
});
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 45
}
// Test OpenStorageDirectory when an opening of the storage directory is
// already ongoing and an exclusive directory lock is requested after that.
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Range [63, 61) out of bounds for length 64
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 45
ASSERT_NO_FATAL_FAILURE( std::move(value.ResolveValue
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 56
auto waitCjava.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 73
;
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 50
Cjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 50
:java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 72
::move(value.ResolveValue
/* aExclusive */ true);
nsTArray<RefPtr<BoolPromise>> java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 5
promises.AppendElementjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 45
quotaManager
->OpenStorageDirectory(
PersistenceScope::CreateFromValue(java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 45
::,java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 78
/* aExclusive */ false)java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 30
->PersistenceScope:java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 73
[& /* aExclusive */;
RefPtr<UniversalDirectoryLock
)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
nsTArray<RefPtr<BoolPromise>> promises;
if(I) java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
BoolPromise:(aValue.RejectValue()
_ quotaManager
RefPtr< OriginScope::FromNull::(,ClientStorageScope:(,
std Then) _java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
if (aValue (IsReject) {
returnjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 74
}));
promises.AppendElement(directoryLock->Acquire());
promises.AppendElement(
quotaManager
-> <java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 67
java.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 79
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 78
/* aExclusive */ false);
->Then(java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
(java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 75
aValue java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
if) java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
RefPtr<UniversalDirectoryLock// finished and an exclusive client directory lock for a non-overlapping
::(.();
DropDirectoryLock(directoryLock);
) {
});
{
auto java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
Await java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 53
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 5
(java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 56
}
});
/* aExclusive */ false));
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 45
}
// Test OpenStorageDirectory when an opening of the storage directory already
// finished.
TEST_F(TestQuotaManager, OpenStorageDirectory_Finished) {
:java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 42
ASSERT_NO_FATAL_FAILURE(java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 39
PerformOnBackgroundThread([]() {
QuotaManager (quotaManager-);
ASSERT_TRUE(quotaManager);
{
auto value = Await(}
::java.lang.StringIndexOutOfBoundsException: Range [73, 71) out of bounds for length 73
OriginScope::FromNull>java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 66
/* aExclusive */ true);
ASSERT_TRUE(value.java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
RefPtr<ASSERT_TRUE(;
std::move(value.ResolveValue());
value >java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 60
ASSERT_TRUE(-java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 56
}
{
auto value = Await
Cjava.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 73
:,)java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
/* aExclusive */ false));
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 5
ASSERT_NO_FATAL_FAILUREjava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 45
std::move(value.java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
DropDirectoryLock(directoryLock);
ASSERT_TRUE(quotaManager=java.lang.StringIndexOutOfBoundsException: Range [51, 49) out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
)java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
ASSERT_NO_FATAL_FAILURE(AssertStorageInitialized());
ASSERT_NO_FATAL_FAILURE(ShutdownStorage() java.lang.StringIndexOutOfBoundsException: Range [42, 39) out of bounds for length 42
}
// Test OpenStorageDirectory when an opening of the storage directory already
// finished but storage shutdown has just been scheduled.
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 78
(java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 45
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 30
quotaManager-java.lang.StringIndexOutOfBoundsException: Range [74, 71) out of bounds for length 76
java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 53
;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
auto value = Await(quotaManager-> auto destroyingDirectoryLockHandle =(java.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 76
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 5
OriginScope:FromNull) ClientStorageScope:CreateFromNull(,
/* aExclusive */ false));
ASSERT_TRUE(value.()java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
RefPtr<UniversalDirectoryLock(;
std::move(value.ResolveValue());
DropDirectoryLock(directoryLock);
ASSERT_TRUEAjava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 77
}
nsTArrayjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 56
promises.(originStateMetadataAfter
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 51
quotaManager
->OpenStorageDirectory(
:java.lang.StringIndexOutOfBoundsException: Range [78, 77) out of bounds for length 79
O:):java.lang.StringIndexOutOfBoundsException: Range [76, 75) out of bounds for length 78
/** java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
-> java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 54
[]}
aValue) {
if (aValue.IsRejectjava.lang.StringIndexOutOfBoundsException: Range [76, 73) out of bounds for length 76
Cjava.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 80
}
<java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 67
java.lang.StringIndexOutOfBoundsException: Range [41, 25) out of bounds for length 58
auto saveOriginAccessTimeCountInternalBefore
return BoolPromise::CreateAndResolve(true, __func__);
}))
{
auto value =
ASSERT_FALSE-)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
LoadDirectoryMetadataHeaderjava.lang.StringIndexOutOfBoundsException: Range [54, 55) out of bounds for length 54
ASSERT_TRUE(quotaManager->java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
}
});
ASSERT_NO_FATAL_FAILUREjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
}
// Test OpenStorageDirectory when an opening of the storage directory already
// finished and an exclusive client directory lock for a non-overlapping
// origin is acquired in between.
TEST_F}
java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
ASSERT_NO_FATAL_FAILURE(java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0
PerformOnBackgroundThread([]() {
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 53
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
auto java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 56
PersistenceScope::java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 73
OriginScope java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 51
/* aExclusive */ false));java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 54
ASSERT_TRUE(java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 0
Ujava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 52
std// Test OpenClientDirectory when the origin directory doesn't exist, and verify// that no access time update occurs. The directory should not be created
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 52
ASSERT_TRUE java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 57
}
RefPtr<ClientDirectoryLock> directoryLock =
-java.lang.StringIndexOutOfBoundsException: Range [65, 63) out of bounds for length 66
/* aExclusive */ true);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
auto value = Await(directoryLock->Acquire());
ASSERT_TRUE(value.IsResolve());
}
{
auto value = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
PersistenceScope:java.lang.StringIndexOutOfBoundsException: Range [46, 44) out of bounds for length 46
:,Cjava.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 72
)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
RefPtr<UniversalDirectoryLockjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Range [13, 10) out of bounds for length 42
DropDirectoryLock(directoryLock
ASSERT_TRUE(quotaManager->IsStorageInitialized());
}
DropDirectoryLock(directoryLock
};
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 5
ShutdownStorage())
}
// Test simple OpenClientDirectory behavior and verify that origin access time
// updates are triggered as expected.
TEST_F(TestQuotaManager, /
auto java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 52
ASSERT_NO_FATAL_FAILURE((saveOriginAccessTimeCountInternaljava.lang.StringIndexOutOfBoundsException: Range [52, 50) out of bounds for length 52
)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
const auto saveOriginAccessTimeCountBefore java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 45
// Can't check origin state metadata since storage is not yet initialized.// releasing the directory lock. Verifies that access time updates still occur,
java.lang.StringIndexOutOfBoundsException: Range [6, 2) out of bounds for length 38
testOriginMetadata);
ASSERT_FALSE();
PerformOnBackgroundThread([]() {
QuotaManager* ();
InitializeTemporaryOrigin(testOriginMetadata,
{
auto value =
(>java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 76
(()java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
ClientDirectoryLockHandle directoryLockHandle originStateMetadataBefore>)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
std::move (directoryMetadataHeaderBefore;
{
auto java.lang.StringIndexOutOfBoundsException: Range [45, 42) out of bounds for length 76
{
java.lang.StringIndexOutOfBoundsException: Range [52, 17) out of bounds for length 56
});
ProcessPendingNormalOriginOperations();
const auto n>=
const );
SaveOriginAccessTimeCountInternal ::java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
ASSERT_EQ( // This can't be ,
u)java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
-
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
auto originStateMetadataAfter = GetOriginStateMetadata(testOriginMetadata);
ASSERT_TRUEjava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 77
(java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 54
ASSERT_TRUE( directoryMetadataHeaderAfter
ASSERT_TRUE((directoryMetadataHeaderAfterjava.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 45
ASSERT_NO_FATAL_FAILURE(;
ASSERT_NO_FATAL_FAILURE(ShutdownStorage());
}
// Test simple OpenClientDirectory behavior when the origin directory exists,
// and verify that access time updates are triggered on first and last access.
TEST_F(TestQuotaManager, OpenClientDirectory_Simple_OriginDirectoryExists) {
auto testOriginMetadata = java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 52
ASSERT_NO_FATAL_FAILURE()java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
ASSERT_NO_FATAL_FAILURE(AssertStorageNotInitialized());
();
ASSERT_NO_FATAL_FAILURE(InitializeTemporaryStorage/* * );
const auto saveOriginAccessTimeCountInternalBefore =
ginMetadata()
/* aCreateIfNonExistent */ true));
java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 75
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
SaveOriginAccessTimeCountInternal();
originStateMetadataBefore GetOriginStateMetadata(testOriginMetadatajava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
ASSERT_TRUE(originStateMetadataBefore);
ASSERT_FALSE(originStateMetadataBefore->mAccessed);
auto java.lang.StringIndexOutOfBoundsException: Range [73, 68) out of bounds for length 73
()java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
ASSERT_TRUE(directoryMetadataHeaderBefore);
ASSERT_FALSEClientDirectoryLockHandle;
PerformOnBackgroundThread[() java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
QuotaManager QuotaManager:(;
ASSERT_TRUE(quotaManager);
{
value=
Await(quotaManager->OpenClientDirectory(GetTestClientMetadata >(testClientMetadata
vIsResolve);
ClientDirectoryLockHandle directoryLockHandle =
std:(.ResolveValue);
{
auto destroyingDirectoryLockHandle = std: :ClientDirectoryLockHandlePromise:java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
}
ASSERT_TRUE(quotaManager->IsStorageInitialized());
}
});
ProcessPendingNormalOriginOperations();
const auto saveOriginAccessTimeCountAfter = SaveOriginAccessTimeCount();
const auto saveOriginAccessTimeCountInternalAfter =
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
ASSERT_EQ(saveOriginAccessTimeCountAfter - saveOriginAccessTimeCountBefore,
2u);
ASSERT_EQ(saveOriginAccessTimeCountInternalAfter
2u);
auto -
ASSERT_TRUE saveOriginAccessTimeCountBefore,
ASSERT_TRUE(originStateMetadataAfter->mAccessed);
auto :moveaValue.java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 76
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
ASSERT_TRUE(directoryMetadataHeaderAfterjava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 61
if (aValue(){
);
}
// Test OpenClientDirectory when the origin directory doesn't exist, and verify
// that no access time update occurs. The directory should not be created
// solely for updating access time.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
) {
auto testOriginMetadata = GetTestOriginMetadata();
ASSERT_NO_FATAL_FAILURE
ASSERT_NO_FATAL_FAILURE(AssertStorageNotInitialized());
ASSERT_NO_FATAL_FAILURE(InitializeStorage());
ASSERT_NO_FATAL_FAILURE(InitializeTemporaryStorage());
ASSERT_NO_FATAL_FAILURE(
InitializeTemporaryOrigin(GetTestOriginMetadata(),
/* aCreateIfNonExistent */ false));
const auto saveOriginAccessTimeCountBefore = SaveOriginAccessTimeCount();
const auto saveOriginAccessTimeCountInternalBefore =
SaveOriginAccessTimeCountInternal();
auto originStateMetadataBefore = GetOriginStateMetadata(testOriginMetadata);
ASSERT_TRUE( EXPECT_EQ(saveOriginAccessTimeCountInternalNow -
ASSERT_FALSE(->mAccessed)
auto directoryMetadataHeaderBefore 1u);
LoadDirectoryMetadataHeader(testOriginMetadata);
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
PerformOnBackgroundThread([]() {
QuotaManager* quotaManager = QuotaManager:: .ppendElement
();
{
auto value = Await(quotaManager->OpenClientDirectory ]java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
&)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
/* aInitializeOrigin */ true, /* aCreateIfNonExistent */ false));
valueIsResolve
ClientDirectoryLockHandle}
stdjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 54
= std:move();
}
(uotaManager>sStorageInitialized());
}
});
ProcessPendingNormalOriginOperations();
constauto = ()java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(;
// This is expected to be 0, the origin directory should not be created BoolPromiseC(rue _)
// solely to update access time when, for example, LSNG explicitly requestsquotaManager>IOThread(, _func__,
// that it not be created if it doesn't exist. The access time will be saved
// later.
ASSERT_EQ(saveOriginAccessTimeCountAfter - saveOriginAccessTimeCountBefore,
0u;
ASSERT_EQ(saveOriginAccessTimeCountInternalAfter -
(aValue.IsReject) java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
0u);
auto originStateMetadataAfter = GetOriginStateMetadata(testOriginMetadata);
ASSERT_TRUE(originStateMetadataAfter);
ASSERT_TRUE(originStateMetadataAfter->mAccessed);
auto directoryMetadataHeaderAfter =
LoadDirectoryMetadataHeader(testOriginMetadata * quotaManager =QuotaManager:()java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
constauto =
ASSERT_NO_FATAL_FAILURE(AssertStorageInitialized());
ASSERT_NO_FATAL_FAILURE(())
}
// Test OpenClientDirectory when a clear operation is scheduled before
// releasing the directory lock. Verifies that access time updates still occur,
// even with the scheduled clear operation.
TEST_F(TestQuotaManager,
java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 74
testOriginMetadata=GetTestOriginMetadata)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
ASSERT_NO_FATAL_FAILURE(ShutdownStorage()}
ASSERT_NO_FATAL_FAILURE(AssertStorageNotInitialized());
ASSERT_NO_FATAL_FAILURE( destroyingDirectoryLockHandle std:(directoryLockHandle)
ASSERT_NO_FATAL_FAILURE(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(
InitializeTemporaryOrigin(java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 5
/* aCreateIfNonExistent */ true));
const auto saveOriginAccessTimeCountBefore = SaveOriginAccessTimeCount();
const auto const auto saveOriginAccessTimeCountAfter = SaveOriginAccessTimeCount();
SaveOriginAccessTimeCountInternal();
auto originStateMetadataBefore = const auto saveOriginAccessTimeCountInternalAfter =
ASSERT_TRUE(originStateMetadataBefore);
ASSERT_FALSE(originStateMetadataBefore SaveOriginAccessTimeCountInternal();
auto directoryMetadataHeaderBefore =
ASSERT_TRUE(directoryMetadataHeaderBefore ASSERT_EQ(saveOriginAccessTimeCountAfter - saveOriginAccessTimeCountBefore,
ASSERT_FALSE u;
PerformOnBackgroundThreadsaveOriginAccessTimeCountInternalBefore,
QuotaManager* 2);
ASSERT_TRUE(quotaManager);
{
auto value =
ASSERT_TRUE(originStateMetadataAfter);
ASSERT_TRUE(value.IsResolve());
ClientDirectoryLockHandle directoryLockHandle =
autodirectoryMetadataHeaderAfter =
nsCOMPtrLoadDirectoryMetadataHeadertestOriginMetadata);
ASSERT_TRUEdirectoryMetadataHeaderAfter;
QM_TRY(MOZ_TO_RESULT(principal), QM_TEST_FAIL);
mozilla::ipc::PrincipalInfo principalInfo;
ASSERT_NO_FATAL_FAILURE(AssertStorageInitialized()java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
);
// This can't be awaited here, it would cause a hang, on the other hand,// Test OpenClientDirctory when an opening of a client directory is already
// it must be scheduled before the handle is moved below.
quotaManager->java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
/* aPersistenceType */ Nothing(), principalInfo);
{
auto destroyingDirectoryLockHandle ::();
}
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ProcessPendingNormalOriginOperations();
const auto saveOriginAccessTimeCountAfter = java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 27
const =
SaveOriginAccessTimeCountInternal() -Then(GetCurrentSerialEventTarget(,_,
ASSERT_EQ(saveOriginAccessTimeCountAfter [directoryLockHandle]
2u);
ASSERT_EQ(saveOriginAccessTimeCountInternalAfter -
saveOriginAccessTimeCountInternalBefore,
2u);
=GetOriginStateMetadata();
ASSERT_FALSE(originStateMetadataAfter) if(.IsReject() java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
=
LoadDirectoryMetadataHeader(testOriginMetadata);
}
[&aV]( {ASSERT_TRUE(aValue.();})java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
ASSERT_NO_FATAL_FAILURE(ShutdownStorage());
}
// Test OpenClientDirectory when a client directory opening is already ongoing
// and the origin directory exists. Verifies that each opening completes only
// after the origin access time update triggered by first access has finished,
// and that access time is updated only on first and last access as expected.
TEST_F(TestQuotaManager, OpenClientDirectory_Ongoing_OriginDirectoryExists) {
auto testOriginMetadata = GetTestOriginMetadata();
ASSERT_NO_FATAL_FAILURE(ShutdownStorage());
ASSERT_NO_FATAL_FAILURE(AssertStorageNotInitialized());
ASSERT_NO_FATAL_FAILURE( [](const BoolPromise::Resolv&aValue){
(InitializeTemporaryStorage);
ASSERT_NO_FATAL_FAILURE(
InitializeTemporaryOrigin(GetTestOriginMetadata(),
constautosaveOriginAccessTimeCountBefore SaveOriginAccessTimeCount(;
const auto saveOriginAccessTimeCountInternalBefore =
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
ASSERT_TRUE()java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
ASSERT_TRUEoriginStateMetadataBefore);
ASSERT_FALSE( -IsStorageInitializedInternal());
auto directoryMetadataHeaderBefore =
LoadDirectoryMetadataHeader(testOriginMetadata);
ASSERT_TRUE(directoryMetadataHeaderBefore java.lang.StringIndexOutOfBoundsException: Range [74, 27) out of bounds for length 74
java.lang.StringIndexOutOfBoundsException: Range [44, 14) out of bounds for length 57
PerformOnBackgroundThread([saveOriginAccessTimeCountBefore,
essTimeCountInternalBefore]() {
auto testClientMetadata = GetTestClientMetadata();
QuotaManager* quotaManager = QuotaManager::Get();
=
ClientDirectoryLockHandle directoryLockHandle}
ClientDirectoryLockHandle directoryLockHandle2;
nsTArrayRefPtr<> ;
promises.AppendElement(
quotaManager->OpenClientDirectory(testClientMetadata)
->Then(etCurrentSerialEventTarget,_func__
[saveOriginAccessTimeCountBefore, _)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
QuotaManager::java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 23
ResolveOrRejectValueAppendElement
if.IsReject){
return BoolPromise::CreateAndReject(aValue.RejectValue(),
__func__;
}
QuotaManager* quotaManager = QuotaManager::Get();
java.lang.StringIndexOutOfBoundsException: Range [52, 39) out of bounds for length 54
constow =
quotaManager->SaveOriginAccessTimeCount
EXPECT_EQ(saveOriginAccessTimeCountNow -
BoolPromise:CreateAndReject(aValue.RejectValue(),
u)
directoryLockHandle = std:}
BoolPromise::CreateAndResolve(true, __func__);
})
-> std:move(.ResolveValue);
[java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 22
BoolPromisejava.lang.StringIndexOutOfBoundsException: Range [64, 62) out of bounds for length 73
C(.(,
__func__ );
}
QuotaManager* quotaManager auto =
MOZ_RELEASE_ASSERT)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
->SaveOriginAccessTimeCountInternal;
EXPECT_EQ(saveOriginAccessTimeCountInternalNow - })java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
saveOriginAccessTimeCountInternalBefore,
1u);
: ;
}));
promises.AppendElement// ongoing and an exclusive directory lock is requested after that.
(testClientMetadata
->Then(ASSERT_NO_FATAL_FAILURE(ShutdownStorage());
[saveOriginAccessTimeCountBefore
andlePromise
ResolveOrRejectValue ([()java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
(aValueIsReject() java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
return BoolPromise RefPtrUniversalDirectoryLock> directoryLock =
__func__);
quotaManager->CreateDirectoryLockInternal(
QuotaManager* quotaManager = QuotaManager::Get();
MOZ_RELEASE_ASSERT ClientStorageScope::CreateFromNull(),
const auto saveOriginAccessTimeCountNow =
quotaManager->aveOriginAccessTimeCount();
EXPECT_EQ(saveOriginAccessTimeCountNow -
saveOriginAccessTimeCountBeforejava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
1u);
directoryLockHandle2 = std: >() _func__java.lang.StringIndexOutOfBoundsException: Range [59, 60) out of bounds for length 59
return BoolPromise: &aValue java.lang.StringIndexOutOfBoundsException: Range [59, 60) out of bounds for length 59
})
java.lang.StringIndexOutOfBoundsException: Range [53, 12) out of bounds for length 54
[saveOriginAccessTimeCountInternalBefore );
:java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 73
if (auto destroyingDirecto java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
_return::(,_func__
}
QuotaManager* promises.(irectoryLock>);
MOZ_RELEASE_ASSERT(quotaManager);
autosaveOriginAccessTimeCountInternalNow
quotaManager-SaveOriginAccessTimeCountInternal
EXPECT_EQ:ClientDirectoryLockHandlePromise::
saveOriginAccessTimeCountInternalBefore,
ResolveOrRejectValue&& aValue) {
return BoolPromise::CreateAndResolve(true, __func__);
})
{
auto value =
Await(BoolPromise::All(GetCurrentSerialEventTarget func__);
ASSERT_TRUE(value.IsResolve());
ASSERT_TRUE(quotaManager-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
{
auto destroyingDirectoryLockHandle = std::move(java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 0
}
{
= m(java.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 76
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
saveOriginAccessTimeCountAfter=SaveOriginAccessTimeCount;
const auto saveOriginAccessTimeCountInternalAfter ASSERT_TRUEvalue.())java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
SaveOriginAccessTimeCountInternal;
ASSERT_EQ(saveOriginAccessTimeCountAfter - saveOriginAccessTimeCountBefore,
2u);
ASSERT_EQ( -
saveOriginAccessTimeCountInternalBefore,
2u;
auto originStateMetadataAfter // Test OpenClientDirectory when an opening of a client directory already
// finished.
SSERT_TRUE(-m)
auto directoryMetadataHeaderAfter java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
LoadDirectoryMetadataHeader(java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 53
ASSERT_TRUE(
ASSERT_TRUE(directoryMetadataHeaderAfter->mAccessed);
ASSERT_NO_FATAL_FAILUREjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
ASSERT_NO_FATAL_FAILURE(Await(quotaManager->OpenClientDirecGetTestClientMetadata))java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
}
// Test OpenClientDirctory when an opening of a client directory is already
// ongoing and storage shutdown is scheduled after that.
TEST_F(TestQuotaManager, OpenClientDirectory_OngoingWithScheduledShutdown) {
ASSERT_NO_FATAL_FAILURE(ShutdownStorage();
ASSERT_NO_FATAL_FAILURE(AssertStorageNotInitialized( {
PerformOnBackgroundThread([]() {
QuotaManager* quotaManager = QuotaManager::Get();
ASSERT_TRUE(quotaManager);
ClientDirectoryLockHandle directoryLockHandle;
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 5
ndElement
quotaManager->Await(quotaManager->OpenClientDirectory(GetTestClientMetadata()));
->Then(GetCurrentSerialEventTarget(), __func__,
&irectoryLockHandle(
QuotaManager::ClientDirectoryLockHandlePromise::
ResolveOrRejectValue&& aValue) {
if
return BoolPromise::CreateAndReject(aValue.RejectValue(),
__func__;
}
[&aValue-IsStorageInitializedjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
std:ove(Value.esolveValue)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
return BoolPromise::CreateAndResolve(true, __func__);
})
>Then(uotaManager>(),__func__,
[](const BoolPromise::ResolveOrRejectValue& aValue) {
if// Test OpenClientDirectory when an opening of a client directory already
return BoolPromise::CreateAndReject((TestQuotaManager, OpenClientDirectory_FinishedWithScheduledShutdown
_
}
[]() {
QuotaManagerGet)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
ASSERT_TRUE(quotaManager);
SSERT_TRUE
quotaManager- (.();
}();
returnBoolPromise:CreateAndResolvetrue _func__;
})
->Then(GetCurrentSerialEventTarget :vjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 42
[&directoryLockHandle](
const java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
{
auto java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 0
std::movejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
if (aValue.IsReject()) {
BoolPromise:CreateAndReject(ValueRejectValue()
__func__);
}
return BoolPromise::CreateAndResolve(true, __func__);
});
promises.AppendElement(quotaManager->ShutdownStorage());
promises.AppendElementif(.) {
return:(
- __func__;
[](QuotaManager::java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 22
ResolveOrRejectValue&
if (aValue.IsReject()) {
return BoolPromise::CreateAndRejectauto =
__func__);
}
ClientDirectoryLockHandle
return BoolPromise:CreateAndResolvetrue _func__)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
value java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
(directoryLockHandle
}
return java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
}));
{
auto java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
Target(), promises);
ASSERT_TRUE(value.IsResolve
java.lang.StringIndexOutOfBoundsException: Range [56, 17) out of bounds for length 56
}
});
ASSERT_NO_FATAL_FAILURE(AssertStorageInitialized());
}
// Test OpenClientDirectory when an opening of a client directory is already
// ongoing and an exclusive directory lock is requested after that.
TEST_F(ASSERT_NO_FATAL_FAILUR(AssertStorageNotInitialized);
OpenClientDirectory_OngoingWithExclusiveDirectoryLock) {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ASSERT_NO_FATAL_FAILURE(AssertStorageNotInitialized());
PerformOnBackgroundThread([]() java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 7
QuotaManager quotaManager=QuotaManager:Get(;
ASSERT_TRUE(quotaManager);
RefPtr<UniversalDirectoryLock java.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
-(
PersistenceScope::CreateFromNull(), java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 5
quotaManager->CreateDirectoryLock(GetOtherTestClientMetadata(),
/* aExclusive */ true);/* /true;
nsTArray<RefPtr<BoolPromise>> promises{
promises.ppendElement
quotaManager->OpenClientDirectory( ASSERT_TRUE(alue.IsResolve);
->Then(GetCurrentSerialEventTarget(),
[&directoryLock](
QuotaManager::ClientDirectoryLockHandlePromise::
&&aValue){
DropDirectoryLock(directoryLock);
(aValueIsReject() {
return BoolPromise::CreateAndReject(aValue.RejectValue(),
java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 53
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
stdmoveaValue)
DropDirectoryLockdirectoryLock)
autodestroyingDirectoryLockHandlejava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
ASSERT_NO_FATAL_FAILUREAssertStorageInitialized))
}
return BoolPromise::CreateAndResolve(true, __func__);
}));
promises.AppendElementTEST_FTestQuotaManager OpenClientDirectory_InitializeOrigin java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
-OpenClientDirectory(GetTestClientMetadata)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
->Then(GetCurrentSerialEventTarget(Metadata(),
[](QuotaManager::ClientDirectoryLockHandlePromise::
&& aValue) {
if (aValue.IsReject()) {
return BoolPromise::CreateAndReject(aValue.RejectValue(),
__func__ :java.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 71
}
ClientDirectoryLockHandle __func__);
std::move
{
=
std::move(directoryLockHandle);
}
return BoolPromise::CreateAndResolve(true, __func__);
}})
{
autovalue=
Await(BoolPromise::All(GetCurrentSerialEventTarget(), promises));
ASSERT_TRUEvalueIsResolve))
if (Value.IsReject(){
}
});
()
ASSERT_NO_FATAL_FAILURE(ShutdownStorage());
}
// Test OpenClientDirectory when an opening of a client directory already
// finished.
TEST_F java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 72
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
ssertStorageNotInitialized)
PerformOnBackgroundThread[){
QuotaManager* quotaManager = QuotaManager::Get();
();
{
auto value =
Await(quotaManager-> java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
ASSERT_TRUE(value.IsResolve());
ClientDirectoryLockHandle directoryLockHandle =
std::move(value.ResolveValue());
{
autodestroyingDirectoryLockHandle = std::move(directoryLockHandle);
}
ASSERT_TRUE(quotaManager->IsStorageInitialized());
}
{
auto value =
Await( )
ASSERT_TRUE(value.IsResolve());
returnBoolPromise:CreateAndResolve(true, __func__);
std::move(value.ResolveValue());
{
auto java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 5
}
sStorageInitialized()java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
});
ASSERT_NO_FATAL_FAILURE(AssertStorageInitialized());
ASSERT_NO_FATAL_FAILURE(ShutdownStorage());
}
// Test OpenClientDirectory when an opening of a client directory already
// finished but storage shutdown has just been scheduled.
(estQuotaManager OpenClientDirectory_FinishedWithScheduledShutdown {
ASSERT_NO_FATAL_FAILURE(ShutdownStorage());
(());
PerformOnBackgroundThread([]() {
()java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
{
auto value =
quotaManager>())
ASSERT_TRUE(value.IsResolve());
ClientDirectoryLockHandle directoryLockHandle
std::move(value.ResolveValue());
{
auto destroyingDirectoryLockHandle = std:: (.IsReject(;
}
ASSERT_TRUE(>();
}
nsTArray<RefPtr<BoolPromise>>);
(quotaManager-ShutdownStorage()java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
promises.
tMetadata
->Then java.lang.StringIndexOutOfBoundsException: Range [41, 25) out of bounds for length 45
[](QuotaManager::ClientDirectoryLockHandlePromiseTestQuotaManager )java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (aValue.IsReject(
return BoolPromise::CreateAndReject( =:Get)
__func__);
}
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 37
std::move(aValue.ResolveValue ASSERT_TRUE(quotaManager->IsStorageInitialized());
{
auto destroyingDirectoryLockHandle =
std:ASSERT_NO_FATAL_FAILUREAssertStorageInitialized);
}
return BoolPromise::CreateAndResolve(true, _ ASSERT_NO_FATAL_FAILURE(ShutdownStorage());
}));
{
auto value =
Await(BoolPromise::All(GetCurrentSerialEventTarget(TEST_FTestQuotaManager, InitializeStorage_Ongoing java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
ASSERT_TRUE(value.IsResolve());
ASSERT_TRUE(->sStorageInitialized)
}
});
(AssertStorageInitialized))java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
ASSERT_NO_FATAL_FAILURE( nsTArray<RefPtr<BoolPromise>>
}
// Test OpenClientDirectory when an opening of a client directory already
// finished with an exclusive client directory lock for a different origin is
// acquired in between.
TEST_F(java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
irectory_FinishedWithOtherExclusiveClientDirectoryLock
(ShutdownStorage();
_FAILURE(AssertStorageNotInitialized);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
QuotaManagerjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 54
ASSERT_TRUE(quotaManager);
{
auto value =
Await(quotaManager->OpenClientDirectory(GetTestClientMetadata()));
ASSERT_TRUE(value.IsResolve());
ClientDirectoryLockHandle directoryLockHandle =
std::move(value.ResolveValue ASSERT_NO_FATAL_FAILURE(ShutdownStorage();
{
auto = ::(;
}
(quotaManager>())
ASSERT_TRUE(quotaManager);
RefPtr<ClientDirectoryLock> directoryLock =
quotaManager->CreateDirectoryLock(GetOtherTestClientMetadata nsTArray<RefPtr<BoolPromise>> promises;
/* aExclusive */ true);
{
autovalue=Await(->cquire()java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
ASSERT_TRUE(value.IsResolve());
}
{
auto value =
Awaitjava.lang.StringIndexOutOfBoundsException: Range [30, 28) out of bounds for length 76
ASSERT_TRUE(value.java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 5
ClientDirectoryLockHandle directoryLockHandle =
std::ASSERT_NO_FATAL_FAILUREShutdownStorage()
{
autodestroyingDirectoryLockHandle =std:movedirectoryLockHandle);
}
ASSERT_TRUE(quotaManager->// Test InitializeStorage when a storage initialization is already ongoing and
}
DropDirectoryLock(directoryLock);
);
ASSERT_NO_FATAL_FAILURE(AssertStorageInitialized());
ASSERT_NO_FATAL_FAILURE(ShutdownStorage());
}
TEST_F (ssertStorageNotInitialized);
ASSERT_NO_FATAL_FAILURE(ShutdownStorage( ([()
ASSERT_NO_FATAL_FAILURE(AssertStorageNotInitialized());
PerformOnBackgroundThread([]() {
QuotaManager* quotaManager = nsTArray<<oolPromise> ;
ASSERT_TRUE(quotaManager);
ClientDirectoryLockHandlejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
RefPtr<BoolPromise> promise =
quotaManager
->penClientDirectory(GetTestClientMetadata(),
/* aInitializeOrigin */ true)
->Then(GetCurrentSerialEventTarget(), __func__,
[&directoryLockHandle](
QuotaManager::ClientDirectoryLockHandlePromise::
ResolveOrRejectValue&& aValue) {
if (aValue
return BoolPromise:CreateAndReject(aValue.RejectValue(),
__func__);
}
[&aValue]() { ASSERT_TRUE(aValue.ResolveValue()); }();
directoryLockHandle = std::move(aValue.ResolveValue());
return BoolPromise:: GetCurrentSerialEventTarget(), __func__
})
->Then(quotaManager->IOThread(), __func__,
[](const BoolPromise::ResolveOrRejectValue& aValue) {
if (aValue.IsReject()) java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return BoolPromise::CreateAndReject(java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 37
)
}
[]() {
QuotaManager* quotaManager
java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 49
ASSERT_TRUE(
quotaManager->IsTemporaryOriginInitializedInternal(
();
(;
)
->Then( PerformOnBackgroundThread([](
[](
const BoolPromise::ResolveOrRejectValue& aValue) {
{
auto destroyingDirectoryLockHandle =
:move()
}
if(.(){
return BoolPromise::CreateAndReject(aValue.RejectValue(),
_func__;
}
return BoolPromise::java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 43
;
{
auto value = Await(promise);
value.()
ASSERT_TRUE(value.ResolveValue());
}
});
ASSERT_NO_FATAL_FAILURE(
AssertTemporaryOriginInitialized(GetTestOriginMetadata()));
ASSERT_NO_FATAL_FAILURE( (directoryLock;
(]){
QuotaManager* quotaManager = QuotaManager::Get();
ASSERT_TRUE)
ClientDirectoryLockHandle directoryLockHandlejava.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
QuotaManager: =
quotaManager->OpenClientDirectory(GetTestClientMetadatajava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 62
/* aInitializeOrigin */ false);
{
auto value = Await(promise);
A(IsReject()java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
ASSERT_EQ(value.RejectValue(),
NS_ERROR_DOM_QM_CLIENT_INIT_ORIGIN_UNINITIALIZED);
}
});
ASSERT_NO_FATAL_FAILURE(
AssertTemporaryOriginNotInitialized(GetTestOriginMetadata()));
ASSERT_NO_FATAL_FAILURE(AssertStorageInitialized());
ASSERT_NO_FATAL_FAILURE(ShutdownStorage());
}
// Test simple InitializeStorage.
TEST_F(TestQuotaManager, InitializeStorage_Simple) {
ASSERT_NO_FATAL_FAILURE(ShutdownStorage());
ASSERT_NO_FATAL_FAILURE(AssertStorageNotInitialized());
PerformOnBackgroundThread([]() {
QuotaManager* quotaManager = QuotaManager::Get();
ASSERT_TRUE(quotaManager);
<java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 47
auto value = Await(quotaManager->InitializeStorage());
RefPtr>directoryLock2java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
ASSERT_TRUE(quotaManager->IsStorageInitialized());
}
});
ASSERT_NO_FATAL_FAILURE(ssertStorageInitialized);
ASSERT_NO_FATAL_FAILURE(ShutdownStorage());
}
// Test InitializeStorage when a storage initialization is already ongoing.
TEST_F(TestQuotaManager, InitializeStorage_Ongoing) {
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 18
ASSERT_NO_FATAL_FAILURE(AssertStorageNotInitialized());
PerformOnBackgroundThread([
QuotaManager QuotaManager:(;
ASSERT_TRUEquotaManager;
nsTArrayRefPtr<oolPromise ;
promises.AppendElement(quotaManager-};
promises.AppendElement(quotaManager->InitializeStorage());
{
auto value =
BoolPromise:All(GetCurrentSerialEventTarget(,promises));
ASSERT_TRUE(value.IsResolve());
ASSERT_TRUE(quotaManager->IsStorageInitialized ASSERT_NO_FATAL_FAILURE(ShutdownStorage();
}
});
ASSERT_NO_FATAL_FAILURE(AssertStorageInitialized());
ASSERT_NO_FATAL_FAILURE// shared client directory locks are requested after that with storage shutdown
}
// Test InitializeStorage when a storage initialization is already ongoing and
// storage shutdown is scheduled after that.
TEST_F(TestQuotaManager, InitializeStorage_OngoingWithScheduledShutdown) {
ASSERT_NO_FATAL_FAILURE(ShutdownStorage());
ASSERT_NO_FATAL_FAILURE(AssertStorageNotInitialized());
PerformOnBackgroundThreadASSERT_NO_FATAL_FAILUREA());
QuotaManager* quotaManager = QuotaManager::Get PerformOnBackgroundThread[( java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
ASSERT_TRUE(quotaManager);
nsTArray<RefPtr<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
promises.quotaManager->CreateDirectoryLock(GetTestClientMetadata(),
promises.AppendElement(quotaManager->ShutdownStorage());
promises.AppendElement(quotaManager->InitializeStorage());
{
auto value =
A(oolPromise:AllGetCurrentSerialEventTarget(,promises)
ASSERT_TRUE(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
());
}
});
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 54
(()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
}
// Test InitializeStorage when a storage initialization is already ongoing and
// storage shutdown is scheduled after that. The tested InitializeStorage call
// is delayed to the point when storage shutdown is about to finish.
TEST_F(TestQuotaManager,
{
ASSERT_NO_FATAL_FAILURE(ShutdownStorage());
ASSERT_NO_FATAL_FAILURE(AssertStorageNotInitialized());
PerformOnBackgroundThread([]() {
QuotaManager* quotaManager = QuotaManager::Get();
ASSERT_TRUE(quotaManager);
nsTArray<RefPtr<BoolPromise>> promises;
java.lang.StringIndexOutOfBoundsException: Range [26, 12) out of bounds for length 62
OriginOperationCallbackOptions callbackOptions;
callbackOptions.java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 5
ASSERT_NO_FATAL_FAILURE(ShutdownStorage());
promises.AppendElement(quotaManager->ShutdownStorage(Some(callbackOptions),
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
promises.AppendElementT(TestQuotaManager, InitializeStorage_Finishedjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
GetCurrentSerialEventTarget(), java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
[quotaManager = RefPtr(quotaManager)](
const ExclusiveBoolPromise: ([]( java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
QuotaManagerjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 53
EventTarget) _func__
[quotaManager]() { java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
})java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
{
auto java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [60, 15) out of bounds for length 75
ASSERT_TRUEvalueIsResolve)
ASSERT_TRUE(ASSERT_TRUE(quotaManagerIsStorageInitialized());
}
});
ASSERT_NO_FATAL_FAILURE(AssertStorageInitialized());
ASSERT_NO_FATAL_FAILURE(ShutdownStorage());
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
// Test InitializeStorage when a storage initialization is already ongoing and
// an exclusive directory lock is requested after that.
TEST_F(TEST_F(TestQuotaManager ) {
ASSERT_NO_FATAL_FAILURE);
java.lang.StringIndexOutOfBoundsException: Range [53, 25) out of bounds for length 57
PerformOnBackgroundThread ::()java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
QuotaManager* quotaManager = QuotaManager::Get({
ASSERT_TRUE(quotaManager);
RefPtr<UniversalDirectoryLock> directoryLock =
quotaManager->java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0
PersistenceScope::CreateFromNull(), java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* aExclusive */ true);
Await:Gjava.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 75
promises-InitializeStorage-Then
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
[&directoryLockjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// The exclusive directory lock must be released when the first
// storage initialization is finished, otherwise it would endlessly
// block the second storage initialization.
DropDirectoryLock(directoryLock);
if (aValue.IsReject()) {
return BoolPromise::CreateAndReject(aValue.RejectValue(), (hutdownStorage()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
}
return BoolPromise:: QuotaManager* quotaManager = QuotaManager:
}));
promisesAppendElement-Acquire);
promises.AppendElement-CreateDirectoryLockGetTestClientMetadata)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
{
auto value nsTArrayRefPtrBoolPromise>promises;
Await(BoolPromise::ota->InitializeStorage()
ASSERT_TRUE(value.IsResolve());
auto value =
}
});
(()java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
ASSERT_NO_FATAL_FAILURE}
}
// Test InitializeStorage when a storage initialization is already ongoing and
// shared client directory locks are requested after that.
// The shared client directory locks don't have to be released in this case.
TEST_F(TestQuotaManager, InitializeStorage_OngoingWithClientDirectoryLocks
promisesquotaManager-InitializeStorage()java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
ASSERT_NO_FATAL_FAILURE(AssertStorageNotInitialized());
PerformOnBackgroundThread([]() {
::Get)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
ASSERT_TRUE(quotaManagerjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
RefPtr<ClientDirectoryLock
LockGetTestClientMetadata,
/* aExclusive */ false);
RefPtr<ClientDirectoryLock> directoryLock2 =
quotaManager->CreateDirectoryLock
/* aExclusive */ false);
nsTArray<RefPtr<BoolPromise>> promises;
promises.AppendElement(quotaManager-/ storage initialization with storage shutdown performed in between.
// storage shutdown which then unblocks the shutdown.
promises.AppendElementjava.lang.StringIndexOutOfBoundsException: Range [80, 77) out of bounds for length 80
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 54
{
auto value =
Await(BoolPromise::All(GetCurrentSerialEventTarget()RefPtrC =
ASSERT_TRUE(value.IsResolve());
ASSERT_TRUE(quotaManager->java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
DropDirectoryLock(directoryLock);
DropDirectoryLock(directoryLock2);
}
ASSERT_NO_FATAL_FAILURE(AssertStorageInitialized());
java.lang.StringIndexOutOfBoundsException: Range [41, 25) out of bounds for length 45
}
// Test InitializeStorage when a storage initialization is already ongoing and
// shared client directory locks are requested after that with storage shutdown
// scheduled in between.
TEST_F(TestQuotaManager
) java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
ASSERT_NO_FATAL_FAILURES();
ASSERT_NO_FATAL_FAILURE(AssertStorageNotInitialized());
PerformOnBackgroundThread([]() {
QuotaManager* AppendElementq-InitializeStorage;
ASSERT_TRUE(quotaManager);
RefPtr<ClientDirectoryLock> directoryLock =
quotaManager
java.lang.StringIndexOutOfBoundsException: Range [31, 17) out of bounds for length 32
[directoryLock]( DropDirectoryLockdirectoryLock) )
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
quotaManager )java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
/* aExclusive */ false);
nsTArray<RefPtr<BoolPromise>> promises;
promises.AppendElement(quotaManager->java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 24
promises.AppendElement(directoryLock->Acquire());
promises.AppendElement(quotaManager->ShutdownStorage());
promises.AppendElement(ASSERT_NO_FATAL_FAILURE(AssertStorageNotInitialized
{
auto value =
Await(BoolPromise::All(java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 0 | |