Skip to content

Commit

Permalink
Remove a few ambiguous errors
Browse files Browse the repository at this point in the history
  • Loading branch information
noamr committed Nov 14, 2021
1 parent 820bf6c commit c2496a3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 33 deletions.
3 changes: 0 additions & 3 deletions resource-timing/csp-block-fetch.js

This file was deleted.

17 changes: 0 additions & 17 deletions resource-timing/entries-for-csp-network-error.html

This file was deleted.

1 change: 0 additions & 1 deletion resource-timing/entries-for-csp-network-error.html.headers

This file was deleted.

16 changes: 4 additions & 12 deletions resource-timing/entries-for-network-errors.sub.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
</title>
<link rel="author" title="Noam Rosenthal" href="[email protected]">
<link rel="help" href="https://www.w3.org/TR/resource-timing-2/#sec-performanceresourcetiming"/>
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
Expand All @@ -31,25 +32,16 @@
network_error_entry_test(
`${REMOTE_ORIGIN}${validXmlUrl}`, null, "failed cross-origin requests");

network_error_entry_test(`about:config`, null, "failed about:*");
network_error_entry_test(`about:config`, {method: 'PUT'}, "failed about:* PUT");
network_error_entry_test(validBlobURL, {method: 'POST'}, "POST to a blob");
network_error_entry_test(invalidDataURL, null,"invalid data URL");
network_error_entry_test('file:///etc/passwords.txt', null, "file URL");
network_error_entry_test('somerandomscheme://whatisthat.com', null, "unrecognized scheme");
network_error_entry_test(`/common/redirect.py?location=${validDataURL}`, null, "non-HTTP redirect");
network_error_entry_test('//{{hosts[][nonexistent]}}/common/dummy.xml', null, "DNS failure");
network_error_entry_test('//10.0.0.200/common/dummy.xml', null, "Conection timeout");

network_error_entry_test('/common/dummy.xml', {cache: 'only-if-cached'},
"only-if-cached resource that was not cached");

network_error_entry_test(`/common/redirect.py?location=${validDataURL}`, null, "non-HTTP redirect");
network_error_entry_test(
`/element-timing/resources/multiple-redirects.py?redirect_count=22&final_resource=${validXmlUrl}`,
null, "too many redirects");

network_error_entry_test('//{{hosts[][nonexistent]}}/common/dummy.xml', null, "DNS failure");
network_error_entry_test(validBlobURL, fetchAndAbort, "abort a blob request");
network_error_entry_test(validXmlUrl, fetchAndAbort, "abort an HTTP request");

</script>
</body>
</html>
1 change: 1 addition & 0 deletions resource-timing/resources/entry-invariants.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ const attribute_test_with_validator = (loader, path, validator, run_test, test_l
};

const network_error_entry_test = (url, args_or_loader, label) => {
url = new URL(url, location.href)
promise_test(async () => {
const timeBefore = performance.now();
loader = (typeof args_or_loader === 'function') ?
Expand Down

0 comments on commit c2496a3

Please sign in to comment.