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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/document-dir-property.html

Issue 1420593005: Remove [TreatNullAs=NullString] from the 'dir' attribute on Document (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/document-dir-property-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 <html> 1 <html>
2 <head> 2 <head>
3 <link rel="help" href="http://www.whatwg.org/specs/web-apps/current-work/multipa ge/elements.html#dom-document-dir"/> 3 <link rel="help" href="http://www.whatwg.org/specs/web-apps/current-work/multipa ge/elements.html#dom-document-dir"/>
4 <script> 4 <script>
5 var headReadDocumentDir = document.dir; 5 var headReadDocumentDir = document.dir;
6 document.dir = "rtl"; 6 document.dir = "rtl";
7 var headWriteDocumentDir = document.dir; 7 var headWriteDocumentDir = document.dir;
8 </script> 8 </script>
9 </head> 9 </head>
10 <body> 10 <body>
(...skipping 10 matching lines...) Expand all
21 debug(""); 21 debug("");
22 22
23 debug("Read document.dir in body"); 23 debug("Read document.dir in body");
24 shouldBeEqualToString("document.dir", "rtl"); 24 shouldBeEqualToString("document.dir", "rtl");
25 debug(""); 25 debug("");
26 26
27 debug("Read document.documentElement.dir in body"); 27 debug("Read document.documentElement.dir in body");
28 shouldBeEqualToString("document.documentElement.dir", "rtl"); 28 shouldBeEqualToString("document.documentElement.dir", "rtl");
29 debug(""); 29 debug("");
30 30
31 debug("Read document.documentElement.getAttribute('dir') in body");
32 shouldBeEqualToString("document.documentElement.getAttribute('dir')", "rtl");
33 debug("");
34
31 debug("Read document.body.dir in body"); 35 debug("Read document.body.dir in body");
32 shouldBeEqualToString("document.body.dir", ""); 36 shouldBeEqualToString("document.body.dir", "");
33 debug(""); 37 debug("");
34 38
35 debug("Write document.dir in body"); 39 debug("Write document.dir in body");
36 document.dir = "ltr"; 40 document.dir = "ltr";
37 shouldBeEqualToString("document.dir", "ltr"); 41 shouldBeEqualToString("document.dir", "ltr");
38 debug(""); 42 debug("");
39 43
40 debug("Read document.documentElement.dir in body"); 44 debug("Read document.documentElement.dir in body");
41 shouldBeEqualToString("document.documentElement.dir", "ltr"); 45 shouldBeEqualToString("document.documentElement.dir", "ltr");
42 debug(""); 46 debug("");
43 47
44 debug("Read document.body.dir in body"); 48 debug("Read document.body.dir in body");
45 shouldBeEqualToString("document.body.dir", ""); 49 shouldBeEqualToString("document.body.dir", "");
46 debug(""); 50 debug("");
47 51
52 debug("Read document.documentElement.getAttribute('dir') in body");
53 shouldBeEqualToString("document.documentElement.getAttribute('dir')", "ltr");
54 debug("");
55
48 debug("Write non-canonical case document.dir in body"); 56 debug("Write non-canonical case document.dir in body");
49 shouldNotThrow("document.dir = 'RTL'"); 57 shouldNotThrow("document.dir = 'RTL'");
50 shouldBeEqualToString("document.dir", "rtl"); 58 shouldBeEqualToString("document.dir", "rtl");
51 debug(""); 59 debug("");
52 60
61 debug("Read document.documentElement.getAttribute('dir') in body");
62 shouldBeEqualToString("document.documentElement.getAttribute('dir')", "RTL");
63 debug("");
64
53 debug("Write invalid document.dir in body"); 65 debug("Write invalid document.dir in body");
54 shouldNotThrow("document.dir = 'WRONG'"); 66 shouldNotThrow("document.dir = 'WRONG'");
55 shouldBeEqualToString("document.dir", ""); 67 shouldBeEqualToString("document.dir", "");
56 debug(""); 68 debug("");
57 69
70 debug("Read document.documentElement.getAttribute('dir') in body");
71 shouldBeEqualToString("document.documentElement.getAttribute('dir')", "WRONG");
72 debug("");
73
58 debug("Write non-canonical case document.body.dir in body"); 74 debug("Write non-canonical case document.body.dir in body");
59 shouldNotThrow("document.body.dir = 'RTL'"); 75 shouldNotThrow("document.body.dir = 'RTL'");
60 shouldBeEqualToString("document.body.dir", "rtl"); 76 shouldBeEqualToString("document.body.dir", "rtl");
61 debug(""); 77 debug("");
62 78
63 debug("Write invalid document.body.dir in body"); 79 debug("Write invalid document.body.dir in body");
64 shouldNotThrow("document.body.dir = 'WRONG'"); 80 shouldNotThrow("document.body.dir = 'WRONG'");
65 shouldBeEqualToString("document.body.dir", ""); 81 shouldBeEqualToString("document.body.dir", "");
66 debug(""); 82 debug("");
83
84 document.dir = null;
85 debug("Read document.dir in body");
86 shouldBeEqualToString("document.dir", "");
87 debug("");
88
89 debug("Read document.documentElement.getAttribute('dir') in body");
90 shouldBeEqualToString("document.documentElement.getAttribute('dir')", "null");
91 debug("");
92
67 </script> 93 </script>
68 </body> 94 </body>
69 </html> 95 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/document-dir-property-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698