function StartSingleFileDownloadWithCorrectDownloadTotal() {
  navigator.serviceWorker.ready.then(swRegistration => {
    const options = {
      icons: kIcon,
      title: 'Single-file Background Fetch with accurate downloadTotal',
      downloadTotal: 82,
    };

    return swRegistration.backgroundFetch.fetch(
        kBackgroundFetchId, kBackgroundFetchResource, options);
  }).then(bgFetchRegistration => {
    sendResultToTest('ok');
  }).catch(sendErrorToTest);
}
// downloadTotal equal to the actual size (in bytes).
downloadTotal equal to the actual size (in bytes).
downloadTotal equal to the actual size ( in bytes ) .
function StartSingleFileDownloadWithCorrectDownloadTotal() {
  navigator.serviceWorker.ready.then(swRegistration => {
    const options = {
      icons: kIcon,
      title: 'Single-file Background Fetch with accurate downloadTotal',
      downloadTotal: 82,
    };
    return swRegistration.backgroundFetch.fetch(
        kBackgroundFetchId, kBackgroundFetchResource, options);
  }).then(bgFetchRegistration => {
    sendResultToTest('ok');
  }).catch(sendErrorToTest);
}
function StartSingleFileDownloadWithCorrectDownloadTotal ( ) { navigator . serviceWorker . ready . then ( swRegistration => { const options = { icons : kIcon , title : 'Single-file Background Fetch with accurate downloadTotal' , downloadTotal : 82 , } ; return swRegistration . backgroundFetch . fetch ( kBackgroundFetchId , kBackgroundFetchResource , options ) ; } ) . then ( bgFetchRegistration => { sendResultToTest ( 'ok' ) ; } ) . catch ( sendErrorToTest ) ; }
downloadTotal equal to the actual size (in bytes).
downloadTotal equal to the actual size ( in bytes ) .