| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>Inline module script ignores integrity</title> |
| <script src="../../../resources/testharness.js"></script> |
| <script src="../../../resources/testharnessreport.js"></script> |
| </head> |
| <body> |
| <script> |
| promise_test(() => { |
| return new Promise(function (resolve, reject) { |
| var script = document.createElement('script'); |
| script.type = 'module'; |
| script.textContent = `window.inlineModuleIsExecuted = true`; |
| script.integrity = 'sha256-deadbeef'; |
| script.onload = function () { |
| assert_equals(window.inlineModuleIsExecuted, true); |
| resolve(); |
| }; |
| script.onerror = reject; |
| document.body.appendChild(script); |
| }); |
| }, 'Inline module script ignores integrity'); |
| </script> |
| </body> |
| </html> |