blob: 80e6c1f7f673909b5b5f4d35c95d2f1f54451025 [file] [log] [blame]
(async function(testRunner) {
const {page, session, dp} = await testRunner.startBlank(
`Tests that two quota messages are handled correctly.\n`);
testRunner.log('Initial storage');
const origin = "http://localhost";
const result1 = await dp.Storage.getUsageAndQuota({origin});
testRunner.log(JSON.stringify(result1.result, ["usage", "quota", "overrideActive"], 2));
testRunner.log('Applying override');
const result2 = dp.Storage.overrideQuotaForOrigin({origin, quotaSize: 10000 });
const result3 = dp.Storage.overrideQuotaForOrigin({origin, quotaSize: 9100 });
await Promise.all([result2, result3]);
const result4 = await dp.Storage.getUsageAndQuota({origin});
testRunner.log(JSON.stringify(result4.result, ["usage", "quota", "overrideActive"], 2));
testRunner.completeTest();
})