| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <script> |
| description("Tests that the nonce attribute for HTML link, script, and style elements is reflected."); |
| |
| var element; |
| var tagNamesToTest = ["link", "script", "style"]; |
| for (let tagName of tagNamesToTest) |
| shouldBeEqualToString(`element = document.createElement("${tagName}"); element.setAttribute("nonce", "dummy"); element.nonce`, "dummy"); |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |