diff options
Diffstat (limited to 'LayoutTests/fast/encoding/css-charset-evil.html')
-rw-r--r-- | LayoutTests/fast/encoding/css-charset-evil.html | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/LayoutTests/fast/encoding/css-charset-evil.html b/LayoutTests/fast/encoding/css-charset-evil.html new file mode 100644 index 0000000..1a7bd70 --- /dev/null +++ b/LayoutTests/fast/encoding/css-charset-evil.html @@ -0,0 +1,31 @@ +<html> +<head> + <meta content="text/html; charset=windows-1251" http-equiv="Content-Type"/> + <link rel="stylesheet" type="text/css" href="css-charset-evil.css"> +</head> +<body onload="test()"> +<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=10155">bug 10155</a>: +CSS2: @charset is not supported</p> + +<p>CSS 2.1 says that <code>@charset "</code> must be written literally, +but Firefox and IE allow extra spaces and single quotes.</p> + +<p id="result"></p> + +<script> +if (window.layoutTestController) + layoutTestController.dumpAsText(); + +function test() { + try { + text = document.styleSheets[0].rules[0].style.getPropertyValue("content"); + text = text.replace(/"/g, ""); + document.getElementById("result").textContent = text; + } catch (ex) { + document.getElementById("result").textContent = ex.toString(); + } +} +</script> + +</body> +</html> |