no-report-on-subdomain-404.https.html (1029B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title> 5 Test that include_subdomains policies do NOT report HTTP errors 6 </title> 7 <script src='/resources/testharness.js'></script> 8 <script src='/resources/testharnessreport.js'></script> 9 <script src='./support/nel.sub.js'></script> 10 </head> 11 <body> 12 <script> 13 nel_test(async t => { 14 // Make a request to a resource whose response headers include an 15 // include_subdomains NEL policy. 16 await fetchResourceWithIncludeSubdomainsPolicy(); 17 // Make a request to another resource on a subdomain of the above. This 18 // resource doesn't exist, so the server should return a 404. 19 await fetchMissingResource('www'); 20 // The include_subdomains policy that we just received should NOT cover 21 // the second request, since include_subdomains policies can only report 22 // on DNS errors. 23 assert_false(await reportExists({ 24 url: getURLForMissingResource('www'), 25 type: "network-error", 26 })); 27 }); 28 </script> 29 </body> 30 </html>