Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[resource-timing] Report performance entries with failing status codes #18987

Merged
merged 1 commit into from Sep 11, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

[resource-timing] Report performance entries with failing status codes

Currently we don't report performance entries with failing status codes.
From the spec's perspective, reporting aborts is a MAY, but failing
status code responses should not be considered aborts. [1]
Chromium is the only engine which doesn't report those entries.
This CL fixes that to report them similarly to successful status codes.

Bug: 883400, 990849
Change-Id: Ic5e99e3df77f3869aa0dd70f0141d88016fdb972

[1] w3c/resource-timing#165 (comment)

Change-Id: Ic5e99e3df77f3869aa0dd70f0141d88016fdb972
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1796544
Commit-Queue: Yoav Weiss <yoavweiss@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695596}
  • Loading branch information
Yoav Weiss authored and chromium-wpt-export-bot committed Sep 11, 2019
commit a203db755168164168c3acd81c573a86196a7d4b

This file was deleted.

@@ -0,0 +1,4 @@
def main(request, response):
status = request.GET.first('status')
response.status = (status, "");

@@ -0,0 +1,22 @@
<!doctype html>
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<img src="resources/status-code.py?status=200">
<img src="resources/status-code.py?status=307">
<img src="resources/status-code.py?status=404">
<img src="resources/status-code.py?status=502">
<script>
async_test(t => {
window.addEventListener("load", t.step_func(() => {
const images = document.getElementsByTagName("img");
for (let img of images) {
assert_equals(performance.getEntriesByName(img.src).length, 1, img.src);
}
t.done();
}));
}, "Make sure all status codes are reported");
</script>
@@ -98,14 +98,12 @@
resource: 'resources/missing.jpg',
mode: 'same-origin',
description: 'Network fallback load failure',
should_no_performance_entry: true,
});
verify({
performance: performance,
resource: 'resources/missing.jpg',
mode: 'cross-origin',
description: 'Network fallback cross-origin load failure',
should_no_performance_entry: true,
});
// Tests for respondWith(fetch()).
verify({
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.