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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/misc/resources/resource-timing-sizes-redirect.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-redirect.html and
2 <script src="/resources/testharness.js"></script> 2 // resource-timing-sizes-redirect-worker.html
3 <script src="/resources/testharnessreport.js"></script> 3
4 <script src="/resources/get-host-info.js?pipe=sub"></script> 4 if (typeof document === 'undefined') {
5 <script src="/misc/resources/run-async-tasks-promise.js"></script> 5 importScripts('/resources/testharness.js',
6 <script> 6 '/resources/get-host-info.js?pipe=sub',
7 '/misc/resources/run-async-tasks-promise.js');
8 }
9
7 const baseUrl = 10 const baseUrl =
8 new URL('/security/resources/cors-hello.php', location.href).href; 11 new URL('/security/resources/cors-hello.php', location.href).href;
9 const expectedSize = 73; 12 const expectedSize = 73;
10 13
11 // Because apache decrements the Keep-Alive max value on each request, the 14 // Because apache decrements the Keep-Alive max value on each request, the
12 // transferSize will vary slightly between requests for the same resource. 15 // transferSize will vary slightly between requests for the same resource.
13 const fuzzFactor = 3; // bytes 16 const fuzzFactor = 3; // bytes
14 17
15 const minHeaderSize = 100; 18 const minHeaderSize = 100;
16 19
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 .then(eatBody) 92 .then(eatBody)
90 .then(() => fetch(crossOriginRedirect)) 93 .then(() => fetch(crossOriginRedirect))
91 .then(eatBody) 94 .then(eatBody)
92 .then(() => fetch(mixedRedirect)) 95 .then(() => fetch(mixedRedirect))
93 .then(eatBody) 96 .then(eatBody)
94 .then(() => fetch(complexRedirect)) 97 .then(() => fetch(complexRedirect))
95 .then(eatBody) 98 .then(eatBody)
96 .then(runAsyncTasks) 99 .then(runAsyncTasks)
97 .then(checkResourceSizes); 100 .then(checkResourceSizes);
98 }, 'PerformanceResourceTiming sizes Fetch with redirect test'); 101 }, 'PerformanceResourceTiming sizes Fetch with redirect test');
99 </script> 102
103 done();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698