Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Side by Side Diff: LayoutTests/fast/dom/Document/document-charset.html

Issue 1145773003: Remove the Document.charset setter (making it readonly) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix webexposed tests Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Document/document-charset-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=koi8-r"> 4 <meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
5 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 8
9 if (window.testRunner) 9 if (window.testRunner)
10 testRunner.dumpAsText(); 10 testRunner.dumpAsText();
11 11
12 document.write("<p>Initial</p>"); 12 document.write("<p>Initial</p>");
13 document.write("<p>&nbsp;document.charset: " + document.charset + "</p>"); // MS IE 13 document.write("<p>&nbsp;document.charset: " + document.charset + "</p>"); // MS IE
14 document.write("<p>&nbsp;document.defaultCharset: " + (document.defaultCharset ? "defined" : "undefined") + "</p>"); // MSIE 14 document.write("<p>&nbsp;document.defaultCharset: " + (document.defaultCharset ? "defined" : "undefined") + "</p>"); // MSIE
15 document.write("<p>&nbsp;document.characterSet: " + document.characterSet + "</p >"); // Firefox 15 document.write("<p>&nbsp;document.characterSet: " + document.characterSet + "</p >"); // Firefox
16 document.write("<p>&nbsp;document.inputEncoding: " + document.inputEncoding + "< /p>"); // DOM3 16 document.write("<p>&nbsp;document.inputEncoding: " + document.inputEncoding + "< /p>"); // DOM3
17 17
18 document.write("<p>Setting charset to UTF-8...</p>"); 18 document.write("<p>Setting charset to UTF-8... (expected to have no effect)</p>" );
19 try { 19 document.charset = "utf-8";
20 document.charset = "utf-8"; 20 document.write("<p>&nbsp;document.charset: " + document.charset + "</p>");
21 document.write("<p>&nbsp;document.charset: " + document.charset + "</p>"); 21 document.write("<p>&nbsp;document.defaultCharset: " + (document.defaultCharset ? "defined" : "undefined") + "</p>");
22 document.write("<p>&nbsp;document.defaultCharset: " + (document.defaultChars et ? "defined" : "undefined") + "</p>"); 22 document.write("<p>&nbsp;document.characterSet: " + document.characterSet + "</p >");
23 document.write("<p>&nbsp;document.characterSet: " + document.characterSet + "</p>"); 23 document.write("<p>&nbsp;document.inputEncoding: " + document.inputEncoding + "< /p>");
24 document.write("<p>&nbsp;document.inputEncoding: " + document.inputEncoding + "</p>");
25 } catch (ex) {
26 document.write("<p>Failure</p>");
27 }
28
29 // throws an exception in Firefox, but JavaScriptCore seems to silently ignore a ssignment to read-only properties
30 document.write("<p>Setting characterSet to KOI8-R (expected to fail, matching Fi refox)...</p>");
31 try {
32 document.characterSet = "KOI8-R";
33 document.write("<p>&nbsp;document.charset: " + document.charset + "</p>");
34 document.write("<p>&nbsp;document.defaultCharset: " + (document.defaultChars et ? "defined" : "undefined") + "</p>");
35 document.write("<p>&nbsp;document.characterSet: " + document.characterSet + "</p>");
36 document.write("<p>&nbsp;document.inputEncoding: " + document.inputEncoding + "</p>");
37 } catch (ex) {
38 document.write("<p>Failure (expected)</p>");
39 }
40 24
41 </script> 25 </script>
42 </body> 26 </body>
43 <html> 27 <html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Document/document-charset-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698