| Index: LayoutTests/http/tests/htmlimports/encoding.html
|
| diff --git a/LayoutTests/http/tests/htmlimports/encoding.html b/LayoutTests/http/tests/htmlimports/encoding.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..97dd30bb6b1dde8ca89a510f3cb130facb31dff1
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/htmlimports/encoding.html
|
| @@ -0,0 +1,24 @@
|
| +<!DOCTYPE html>
|
| +<head>
|
| + <script src="/js-test-resources/js-test.js"></script>
|
| + <link rel="import" href="resources/no-encoding.cgi">
|
| + <link rel="import" href="resources/http-encoding.cgi">
|
| + <link rel="import" href="resources/bogus-encoding.cgi">
|
| +</head>
|
| +<body>
|
| +<script>
|
| +description("Test that UTF-8 decoding is applied appropriately to imports");
|
| +jsTestIsAsync = true;
|
| +window.onload = function() {
|
| + links = document.querySelectorAll('link[rel=import]');
|
| + debug("Default encoding should be UTF-8...");
|
| + shouldBeEqualToString("links[0].import.characterSet", "UTF-8");
|
| + debug("But a charset in the Content-Type HTTP header should override it...");
|
| + shouldBeEqualToString("links[1].import.characterSet", "EUC-JP");
|
| + // FIXME: This is probably the wrong behavior
|
| + debug("Any non-empty charset takes precedence, which means we sometimes fall back to sniffing...");
|
| + shouldBeEqualToString("links[2].import.characterSet", "ISO-8859-1");
|
| + finishJSTest();
|
| +};
|
| +</script>
|
| +</body>
|
|
|