OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <head> |
| 3 <script src="/js-test-resources/js-test.js"></script> |
| 4 <link rel="import" href="resources/no-encoding.cgi"> |
| 5 <link rel="import" href="resources/http-encoding.cgi"> |
| 6 <link rel="import" href="resources/bogus-encoding.cgi"> |
| 7 </head> |
| 8 <body> |
| 9 <script> |
| 10 description("Test that UTF-8 decoding is applied appropriately to imports"); |
| 11 jsTestIsAsync = true; |
| 12 window.onload = function() { |
| 13 links = document.querySelectorAll('link[rel=import]'); |
| 14 debug("Default encoding should be UTF-8..."); |
| 15 shouldBeEqualToString("links[0].import.characterSet", "UTF-8"); |
| 16 debug("But a charset in the Content-Type HTTP header should override it...")
; |
| 17 shouldBeEqualToString("links[1].import.characterSet", "EUC-JP"); |
| 18 // FIXME: This is probably the wrong behavior |
| 19 debug("Any non-empty charset takes precedence, which means we sometimes fall
back to sniffing..."); |
| 20 shouldBeEqualToString("links[2].import.characterSet", "ISO-8859-1"); |
| 21 finishJSTest(); |
| 22 }; |
| 23 </script> |
| 24 </body> |
OLD | NEW |