Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/misc/resources/resource-timing-sizes-cache.js

Issue 2159163002: Set Resource Timing transferSize field in Workers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@resource_timing_sizes_render_process
Patch Set: Rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 // This test code is shared between resource-timing-sizes-cache.html and
2 <script src="/resources/testharness.js"></script> 2 // resource-timing-sizes-cache-worker.html
3 <script src="/resources/testharnessreport.js"></script> 3
4 <script src="/misc/resources/run-async-tasks-promise.js"></script> 4 if (typeof document === 'undefined') {
5 <script> 5 importScripts('/resources/testharness.js',
6 '/misc/resources/run-async-tasks-promise.js');
7 }
8
6 // The header bytes are expected to be > |minHeaderSize| and 9 // The header bytes are expected to be > |minHeaderSize| and
7 // < |maxHeaderSize|. If they are outside this range the test will fail. 10 // < |maxHeaderSize|. If they are outside this range the test will fail.
8 const minHeaderSize = 100; 11 const minHeaderSize = 100;
9 const maxHeaderSize = 1024; 12 const maxHeaderSize = 1024;
10 13
11 // The size of this resource must be > maxHeaderSize for the test to be 14 // The size of this resource must be > maxHeaderSize for the test to be
12 // reliable. 15 // reliable.
13 var url = new URL('/resources/square.png', location.href).href; 16 var url = new URL('/resources/square.png', location.href).href;
14 const expectedSize = 18299; 17 const expectedSize = 18299;
15 18
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 return fetch(url) 56 return fetch(url)
54 .then(eatBody) 57 .then(eatBody)
55 .then(() => fetch(url)) 58 .then(() => fetch(url))
56 .then(eatBody) 59 .then(eatBody)
57 .then(() => fetch(url, mustRevalidate)) 60 .then(() => fetch(url, mustRevalidate))
58 .then(eatBody) 61 .then(eatBody)
59 .then(runAsyncTasks) 62 .then(runAsyncTasks)
60 .then(checkResourceSizes); 63 .then(checkResourceSizes);
61 }, 'PerformanceResourceTiming sizes caching test'); 64 }, 'PerformanceResourceTiming sizes caching test');
62 65
63 </script> 66 done();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698