OLD | NEW |
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 26 matching lines...) Expand all Loading... |
37 shouldBeEqualToString("document.dir", "ltr"); | 37 shouldBeEqualToString("document.dir", "ltr"); |
38 debug(""); | 38 debug(""); |
39 | 39 |
40 debug("Read document.documentElement.dir in body"); | 40 debug("Read document.documentElement.dir in body"); |
41 shouldBeEqualToString("document.documentElement.dir", "ltr"); | 41 shouldBeEqualToString("document.documentElement.dir", "ltr"); |
42 debug(""); | 42 debug(""); |
43 | 43 |
44 debug("Read document.body.dir in body"); | 44 debug("Read document.body.dir in body"); |
45 shouldBeEqualToString("document.body.dir", ""); | 45 shouldBeEqualToString("document.body.dir", ""); |
46 debug(""); | 46 debug(""); |
| 47 |
| 48 debug("Write non-canonical case document.dir in body"); |
| 49 shouldNotThrow("document.dir = 'RTL'"); |
| 50 shouldBeEqualToString("document.dir", "rtl"); |
| 51 debug(""); |
| 52 |
| 53 debug("Write invalid document.dir in body"); |
| 54 shouldNotThrow("document.dir = 'WRONG'"); |
| 55 shouldBeEqualToString("document.dir", ""); |
| 56 debug(""); |
| 57 |
| 58 debug("Write non-canonical case document.body.dir in body"); |
| 59 shouldNotThrow("document.body.dir = 'RTL'"); |
| 60 shouldBeEqualToString("document.body.dir", "rtl"); |
| 61 debug(""); |
| 62 |
| 63 debug("Write invalid document.body.dir in body"); |
| 64 shouldNotThrow("document.body.dir = 'WRONG'"); |
| 65 shouldBeEqualToString("document.body.dir", ""); |
| 66 debug(""); |
47 </script> | 67 </script> |
48 </body> | 68 </body> |
49 </html> | 69 </html> |
OLD | NEW |