diff options
Diffstat (limited to 'LayoutTests/fast/encoding')
6 files changed, 16 insertions, 3 deletions
diff --git a/LayoutTests/fast/encoding/css-charset-default-expected.txt b/LayoutTests/fast/encoding/css-charset-default-expected.txt index 954790e..69ddbb1 100644 --- a/LayoutTests/fast/encoding/css-charset-default-expected.txt +++ b/LayoutTests/fast/encoding/css-charset-default-expected.txt @@ -7,3 +7,5 @@ Stylesheet 2 (inherit document charset using link): SUССЕSS Stylesheet 3 (inherit referring stylesheet charset): SUССЕSS Stylesheet 4 (inherit referring inline stylesheet charset): SUССЕSS + +Stylesheet 5 (inherit document charset using link after document.charset was set): SUССЕSS diff --git a/LayoutTests/fast/encoding/css-charset-default.xhtml b/LayoutTests/fast/encoding/css-charset-default.xhtml index 24432f2..87a6d68 100644 --- a/LayoutTests/fast/encoding/css-charset-default.xhtml +++ b/LayoutTests/fast/encoding/css-charset-default.xhtml @@ -10,6 +10,8 @@ <style type="text/css"> @import "css-charset-inherit-iso-8859-5.css?4"; </style> + <script>document.charset = "koi8-r";</script> + <link rel="stylesheet" type="text/css" href="css-charset-inherit-koi-8.css?2"/> </head> <body onload="test()"> <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=11011">bug 11011</a>: @@ -19,6 +21,7 @@ External CSS is parsed as iso-8859-1 even though the main document is utf-8.</p> <p id="res2">Stylesheet 2 (inherit document charset using link): </p> <p id="res3">Stylesheet 3 (inherit referring stylesheet charset): </p> <p id="res4">Stylesheet 4 (inherit referring inline stylesheet charset): </p> +<p id="res5">Stylesheet 5 (inherit document charset using link after document.charset was set): </p> <script type="text/javascript"> if (window.layoutTestController) @@ -33,6 +36,8 @@ function test() { document.getElementById("res3").innerHTML += document.styleSheets[2].cssRules[1].styleSheet.cssRules[0].style.content; document.getElementById("res4").innerHTML += document.styleSheets[3].cssRules[0].styleSheet.cssRules[0].style.content; + + document.getElementById("res5").innerHTML += document.styleSheets[4].cssRules[0].style.content; } catch (ex) { alert(ex.toString()); } diff --git a/LayoutTests/fast/encoding/external-script-charset-expected.txt b/LayoutTests/fast/encoding/external-script-charset-expected.txt index 6575759..0b4c6df 100644 --- a/LayoutTests/fast/encoding/external-script-charset-expected.txt +++ b/LayoutTests/fast/encoding/external-script-charset-expected.txt @@ -1,3 +1,5 @@ Test that external scripts in XHTML documents inherit document charset. -PASS +Javascript 1 (original document charset): PASS + +Javascript 2 (after document.charset was set): PASS diff --git a/LayoutTests/fast/encoding/external-script-charset-koi-8.js b/LayoutTests/fast/encoding/external-script-charset-koi-8.js new file mode 100644 index 0000000..141c931 --- /dev/null +++ b/LayoutTests/fast/encoding/external-script-charset-koi-8.js @@ -0,0 +1 @@ +document.getElementById("result2").innerHTML += ("ó" == "\u0421") ? "PASS" : "FAIL"; diff --git a/LayoutTests/fast/encoding/external-script-charset.js b/LayoutTests/fast/encoding/external-script-charset.js index 841824d..a8306cb 100644 --- a/LayoutTests/fast/encoding/external-script-charset.js +++ b/LayoutTests/fast/encoding/external-script-charset.js @@ -1,4 +1,4 @@ if (window.layoutTestController) layoutTestController.dumpAsText(); -document.getElementById("result").innerHTML = ("Я" == "\u042F") ? "PASS" : "FAIL";
\ No newline at end of file +document.getElementById("result1").innerHTML += ("Я" == "\u042F") ? "PASS" : "FAIL"; diff --git a/LayoutTests/fast/encoding/external-script-charset.xhtml b/LayoutTests/fast/encoding/external-script-charset.xhtml index d89b9d6..f6e8bf3 100644 --- a/LayoutTests/fast/encoding/external-script-charset.xhtml +++ b/LayoutTests/fast/encoding/external-script-charset.xhtml @@ -1,7 +1,10 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" dir="ltr"> <body> <p>Test that external scripts in XHTML documents inherit document charset.</p> - <div id="result"></div> + <p id="result1">Javascript 1 (original document charset): </p> + <p id="result2">Javascript 2 (after document.charset was set): </p> <script type="text/javascript" src="external-script-charset.js"></script> + <script>document.charset = "koi8-r";</script> + <script type="text/javascript" src="external-script-charset-koi-8.js"></script> </body> </html> |