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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/misc/resource-timing-sizes-content-encoding.html

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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/misc/resource-timing-sizes-content-encoding.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/misc/resource-timing-sizes-content-encoding.html b/third_party/WebKit/LayoutTests/http/tests/misc/resource-timing-sizes-content-encoding.html
index f555b4f81ed4d2a101560d3e5b9c24dda88f0dd4..50b6282b0faa4ff084524538c94f70464bbf9915 100644
--- a/third_party/WebKit/LayoutTests/http/tests/misc/resource-timing-sizes-content-encoding.html
+++ b/third_party/WebKit/LayoutTests/http/tests/misc/resource-timing-sizes-content-encoding.html
@@ -2,31 +2,5 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/misc/resources/run-async-tasks-promise.js"></script>
-<script>
-const url = '/misc/resources/gzip-content-encoding.php';
-const uncompressedSize = 1250;
-
-function checkResourceSizes() {
- var absoluteUrl = new URL(url, location.href).href;
- var entries = performance.getEntriesByName(absoluteUrl);
- assert_equals(entries.length, 2, 'Wrong number of entries');
- for (var entry of entries) {
- if (entry.name === absoluteUrl) {
- assert_between_exclusive(entry.encodedBodySize, 0, uncompressedSize,
- 'encodedBodySize');
- assert_equals(entry.decodedBodySize, uncompressedSize);
- }
- }
-}
-
-promise_test(() => {
- // Fetch twice to ensure at least one fetch comes from the cache.
- var eatBody = response => response.arrayBuffer();
- return fetch(url)
- .then(eatBody)
- .then(() => fetch(url))
- .then(eatBody)
- .then(runAsyncTasks)
- .then(checkResourceSizes);
-}, 'PerformanceResourceTiming sizes compressed content test');
+<script src="/misc/resources/resource-timing-sizes-content-encoding.js">
</script>

Powered by Google App Engine
This is Rietveld 408576698