summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/encoding/css-charset-dom.html
diff options
context:
space:
mode:
authorIain Merrick <husky@google.com>2010-09-29 10:59:30 +0100
committerIain Merrick <husky@google.com>2010-09-29 16:27:50 +0100
commitfd5c6425ce58eb75211be7718d5dee960842a37e (patch)
treefdcd1da6ceced587fa315991889655ca4105efb1 /LayoutTests/fast/encoding/css-charset-dom.html
parenta477fea25b6f689360fd2b6a69ee21c3627d3b04 (diff)
downloadexternal_webkit-fd5c6425ce58eb75211be7718d5dee960842a37e.zip
external_webkit-fd5c6425ce58eb75211be7718d5dee960842a37e.tar.gz
external_webkit-fd5c6425ce58eb75211be7718d5dee960842a37e.tar.bz2
Add fast/encoding layout tests.
Merged from WebKit at r67178. The vast majority of these are passing. The exceptions: - Three Mac-specific tests, won't fix. - Four failures in the Java HTTP stack (no problem for the Chrome HTTP stack). - fast/encoding/mailto-always-utf-8 needs a new LayoutTestController callback. Change-Id: I16c613d42acd0ea2dc146909d514376d0a2e5aaa
Diffstat (limited to 'LayoutTests/fast/encoding/css-charset-dom.html')
-rw-r--r--LayoutTests/fast/encoding/css-charset-dom.html32
1 files changed, 32 insertions, 0 deletions
diff --git a/LayoutTests/fast/encoding/css-charset-dom.html b/LayoutTests/fast/encoding/css-charset-dom.html
new file mode 100644
index 0000000..8d591ae
--- /dev/null
+++ b/LayoutTests/fast/encoding/css-charset-dom.html
@@ -0,0 +1,32 @@
+<html>
+<head>
+ <meta content="text/html; charset=windows-1251" http-equiv="Content-Type"/>
+ <link rel="stylesheet" type="text/css" href="css-charset.css" charset="windows-1251">
+ <!-- The document charset and link charset have lower priority than @charset, so they
+ shouldn't affect anything. -->
+</head>
+<body onload="test()">
+<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=10676">bug 10676</a>:
+@charset rules not accessible via DOM</p>
+
+<p id="result"></p>
+
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+function test() {
+ try {
+ charsetRule = document.styleSheets[0].cssRules[0];
+ document.getElementById("result").innerHTML = "cssText: " + charsetRule.cssText + "<br>encoding: " + charsetRule.encoding;
+ document.getElementById("result").innerHTML += "<br>Resetting encoding...";
+ charsetRule.encoding = "koi8-r";
+ document.getElementById("result").innerHTML += "<br>cssText: " + charsetRule.cssText + "<br>encoding: " + charsetRule.encoding;
+ } catch (ex) {
+ document.getElementById("result").textContent = ex.toString();
+ }
+}
+</script>
+
+</body>
+</html>