summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/encoding/preload-encoding.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/preload-encoding.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/preload-encoding.html')
-rw-r--r--LayoutTests/fast/encoding/preload-encoding.html47
1 files changed, 47 insertions, 0 deletions
diff --git a/LayoutTests/fast/encoding/preload-encoding.html b/LayoutTests/fast/encoding/preload-encoding.html
new file mode 100644
index 0000000..ef7b2f5
--- /dev/null
+++ b/LayoutTests/fast/encoding/preload-encoding.html
@@ -0,0 +1,47 @@
+<meta charset="gb2312">
+<body onload="testStylesheets()">
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+</script>
+
+<!--
+ This test uses the word "SUCCESS" spelled with Cyrillic letters "CCE",
+ making decoding problems visible.
+-->
+
+<ol>
+<li>Script with charset:
+<span id="testdiv1"></span>.
+<li>Link rel=stylesheet with charset:
+<span id="testdiv2"></span>
+<li>Script without charset:
+<span id="testdiv3"></span>
+<li>Link rel=stylesheet without charset:
+<span id="testdiv4"></span>
+</ol>
+
+<script type='text/javascript' src='this-does-not-need-to-exist.js'></script>
+
+<script type='text/javascript' src='resources/preloaded-utf-8.js' charset='utf-8'></script>
+
+<link rel='stylesheet' href='resources/preloaded-utf-8.css' charset='utf-8'>
+
+<script charset="utf-8"></script>
+
+<script type='text/javascript' src='resources/preloaded-gb2312.js'></script>
+
+<link rel='stylesheet' charset='utf-8'>
+
+<link rel='stylesheet' href='resources/preloaded-gb2312.css'>
+
+<script>
+function testStylesheets()
+{
+ document.getElementById('testdiv2').innerText =
+ (/SU§³§³§¦SS/.test(document.styleSheets[0].cssRules[0].cssText)) ? "SUCCESS" : "FAILURE";
+
+ document.getElementById('testdiv4').innerText =
+ (/SU§³§³§¦SS/.test(document.styleSheets[1].cssRules[0].cssText)) ? "SUCCESS" : "FAILURE";
+}
+</script>