sizes-helper.js (562B)
1 // Header size is a fixed constant. 2 // https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-transfersize 3 const headerSize = 300; 4 5 const cacheBustUrl = url => { 6 return url + '&unique=' + Math.random().toString().substring(2); 7 } 8 9 const checkSizeFields = (entry, bodySize, transferSize) => { 10 assert_equals(entry.decodedBodySize, bodySize, 11 'decodedBodySize'); 12 assert_equals(entry.encodedBodySize, bodySize, 13 'encodedBodySize'); 14 assert_equals(entry.transferSize, transferSize, 15 'transferSize'); 16 }