WICG / background-fetch

API proposal for background downloading/uploading
https://wicg.github.io/background-fetch/
Apache License 2.0
281 stars 42 forks source link

Typo in the "failureReason" #132

Closed armelpingault closed 5 years ago

armelpingault commented 5 years ago

I believe there is a little typo in the failureReason. While I was testing this new feature, I noticed that when I was setting the wrong downloadTotal to throw a download exceeed error, the words total and download were actually inverted. For example:

const bgFetch = await swReg.backgroundFetch.fetch('my-fetch', ['/ep-5.mp3', 'ep-5-artwork.jpg'], {
    title: 'Episode 5: Interesting things.',
    icons: [{
      sizes: '300x300',
      src: '/ep-5-icon.png',
      type: 'image/png',
    }],
    downloadTotal: 1,
  });
}
console.log(bgFetch);

I am getting a:

failureReason: "total-download-exceeded"

However the documentation is mentioning:

"download-total-exceeded" - The provided `downloadTotal` was exceeded.
jakearchibald commented 5 years ago

This smells like a Chrome bug to me. Thanks for spotting it.

jakearchibald commented 5 years ago

Filed https://bugs.chromium.org/p/chromium/issues/detail?id=913867.