| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| </head> |
| <script> |
| var t_css = async_test( |
| "SRI with CSS with non-empty body after revalidation"); |
| function revalidate_css() { |
| var link = document.createElement('link'); |
| link.setAttribute('rel', 'stylesheet'); |
| link.integrity="sha256-YsI40D9FX0QghiYVdxQyySP2TOmARkLC5uPRO8RL2dE="; |
| link.onload = t_css.unreached_func('Second request should fail'); |
| link.onerror = t_css.step_func_done(); |
| link.href = |
| "../../cache/resources/etag-200-different.php?type=css&empty-after-revalidate-css"; |
| document.head.appendChild(link); |
| } |
| </script> |
| <link |
| href="../../cache/resources/etag-200-different.php?type=css&empty-after-revalidate-css" |
| rel="stylesheet" |
| integrity="sha256-YsI40D9FX0QghiYVdxQyySP2TOmARkLC5uPRO8RL2dE=" |
| onload="t_css.step_timeout(revalidate_css, 0)" |
| onerror="t_css.unreached_func('First request should pass')()" |
| > |
| </html> |