chromium/third_party/blink/web_tests/http/tests/media/media-source/stream_memory_tests/mediasource-appendbuffer-quota-exceeded-default-buffers.html

<!DOCTYPE html>
<html>
    <head>
        <script src="/w3c/resources/testharness.js"></script>
        <script src="/w3c/resources/testharnessreport.js"></script>
        <script src="../mediasource-util.js"></script>
    </head>
    <body>
        <script>
          mediasource_test(function(test, mediaElement, mediaSource)
          {
              var subType = MediaSourceUtil.getSubType(MediaSourceUtil.AUDIO_ONLY_TYPE);
              var mediaDataManifest = subType + '/test-a-5min-44100Hz-1ch-manifest.json';
              MediaSourceUtil.fillUpSourceBuffer(test, mediaSource, mediaDataManifest, function (appendedDataSize) { // onBufferFull
                  assert_greater_than(appendedDataSize, 2 * 1048576, "Appended more than 2MB of data");
                  assert_less_than(appendedDataSize, 3 * 1048576, "Appended less than 3MB of data");
                  test.done();
              });
          }, 'Appending data repeatedly should fill up the buffer and throw a QuotaExceededError when buffer is full.');
        </script>
    </body>
</html>