blob: 85f38627bb8d063b3298a20819010a88eac87fb8 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="style-src 'self'">
<script src="/js-test-resources/js-test.js"></script>
<style nonce="noncynonce">
#test {
color: red;
}
</style>
</head>
<body>
<p id="test">This text should be green.</p>
<script>
description("Style that does not match a 'nonce-*' expression in 'style-src' should not be applied to the page.");
var el = document.querySelector('#test');
shouldBeEqualToString("window.getComputedStyle(el).color", "rgb(0, 0, 0)");
</script>
</body>
</html>