summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/encoding/resources/060.html
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast/encoding/resources/060.html')
-rw-r--r--LayoutTests/fast/encoding/resources/060.html66
1 files changed, 66 insertions, 0 deletions
diff --git a/LayoutTests/fast/encoding/resources/060.html b/LayoutTests/fast/encoding/resources/060.html
new file mode 100644
index 0000000..30dfb79
--- /dev/null
+++ b/LayoutTests/fast/encoding/resources/060.html
@@ -0,0 +1,66 @@
+<!DOCTYPE HTML>
+<style type="text/plain"><meta charset="ISO-8859-9"></style>
+<p>Test:
+<pre>&lt;!DOCTYPE HTML>
+&lt;style type="text/plain">&lt;meta charset="ISO-8859-9">&lt;/style></pre>
+<p>Expected result: <span id="expected">Windows-1254</span>
+<div>
+ <style scoped>
+ .pass { background: green; color: white; padding: 0.5em; font-weight: bold; }
+ .fail { background: red; color: yellow; padding: 0.5em; font-weight: bold; }
+ </style>
+ <p>Encoding used by browser is: <span id="encoding">Script did not run.</span>
+ <p>Result: <span id="result">Script did not run.</span>
+ <script>
+ var encoding = 'unknown';
+ if ('à' == '\u00E0') { // 0xE0
+ if ('™' == '\u2122') { // 0x99
+ if ('þ' == '\u00FE') // 0xFE
+ encoding = 'Windows-1252';
+ else if ('þ' == '\u015F')
+ encoding = 'Windows-1254';
+ else if ('þ' == '\u200F')
+ encoding = 'Windows-1256';
+ else if ('þ' == '\u20AB')
+ encoding = 'Windows-1258';
+ else
+ encoding = 'unknown with 0xE0 = U+00E0 and 0x99 = U+2122';
+ } else if ('ÿ' == '\u02D9') // 0xFF
+ encoding = 'ISO-8859-3';
+ else if ('þ' == '\u0177') // 0xFE
+ encoding = 'ISO-8859-14';
+ else if ('þ' == '\u021B')
+ encoding = 'ISO-8859-16';
+ else if ('þ' == '\u015F')
+ encoding = 'ISO-8859-9';
+ else if ('¾' == '\u00BE') // 0xBE
+ encoding = 'ISO-8859-1';
+ else if ('¾' == '\u0178')
+ encoding = 'ISO-8859-15';
+ else
+ encoding = 'unknown with 0xE0 = U+00E0';
+ } else if ('à' == '\u0101') // 0xE0
+ encoding = 'ISO-8859-10';
+ else if ('à' == '\u0E40') // 0xE0
+ encoding = 'ISO-8859-11';
+ else if ('à' == '\uFFFD') { // 0xE0
+ if ('☺' == '\u263A') // 0xE2 0x98 0xBA
+ encoding = 'UTF-8';
+ else
+ encoding = 'unknown (but ASCII-compatible)';
+ }
+ document.getElementById('encoding').firstChild.data = encoding;
+ var expected = document.getElementById('expected').firstChild.data;
+ if (expected == '(demo - no expected result)') {
+ document.getElementById('result').firstChild.data = 'demo';
+ } else if (encoding == expected) {
+ document.getElementById('result').firstChild.data = 'PASS';
+ document.getElementById('result').className = 'pass';
+ } else {
+ document.getElementById('result').firstChild.data = 'FAIL';
+ document.getElementById('result').className = 'fail';
+ }
+ if (parent.receivedResults)
+ parent.receivedResults();
+ </script>
+</div>