tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

bucket-storage-policy.tentative.https.any.js (746B)


      1 // META: title=Buckets API: Tests for bucket storage policies.
      2 // META: script=/storage/buckets/resources/util.js
      3 // META: global=window,worker
      4 
      5 'use strict';
      6 
      7 promise_test(async testCase => {
      8  await prepareForBucketTest(testCase);
      9 
     10  await promise_rejects_js(
     11      testCase, TypeError,
     12      navigator.storageBuckets.open('negative', {quota: -1}));
     13 
     14  await promise_rejects_js(
     15      testCase, TypeError, navigator.storageBuckets.open('zero', {quota: 0}));
     16 
     17  await promise_rejects_js(
     18      testCase, TypeError,
     19      navigator.storageBuckets.open(
     20          'above_max', {quota: Number.MAX_SAFE_INTEGER + 1}));
     21 }, 'The open promise should reject with a TypeError when quota is requested outside the range of 1 to Number.MAX_SAFE_INTEGER.');