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 <script> | 4 <script> |
4 var headReadDocumentDir = document.dir; | 5 var headReadDocumentDir = document.dir; |
5 document.dir = "rtl"; | 6 document.dir = "rtl"; |
6 var headWriteDocumentDir = document.dir; | 7 var headWriteDocumentDir = document.dir; |
7 </script> | 8 </script> |
8 </head> | 9 </head> |
9 <body> | 10 <body> |
10 <div id="description"></div> | |
11 <div id="console"></div> | |
12 <script src="../../resources/js-test.js"></script> | 11 <script src="../../resources/js-test.js"></script> |
13 <script> | 12 <script> |
14 description("This tests:<br>" | 13 description("document.dir should reflect the 'dir' content attribute of the < html> element and should be settable in <head>."); |
Inactive
2014/04/15 16:35:37
I verified that this test passes in Firefox 28 as
| |
15 + "Bug 9954 REGRESSION: document.dir should return empty string in < ;head><br>" | |
16 + "<a href=\"https://bugs.webkit.org/show_bug.cgi?id=9954\">https://bu gs.webkit.org/show_bug.cgi?id=9954</a><br>"); | |
17 | 14 |
18 debug("Read document.dir in head"); | 15 debug("Read document.dir in head"); |
19 shouldBe("headReadDocumentDir", "''"); | 16 shouldBeEqualToString("headReadDocumentDir", ""); |
20 debug(""); | 17 debug(""); |
21 | 18 |
22 debug("Write document.dir in head"); | 19 debug("Write document.dir in head"); |
23 shouldBe("headWriteDocumentDir", "''"); | 20 shouldBeEqualToString("headWriteDocumentDir", "rtl"); |
24 debug(""); | 21 debug(""); |
25 | 22 |
26 debug("Read document.dir in body"); | 23 debug("Read document.dir in body"); |
27 shouldBe("document.dir", "''"); | 24 shouldBeEqualToString("document.dir", "rtl"); |
25 debug(""); | |
26 | |
27 debug("Read document.documentElement.dir in body"); | |
28 shouldBeEqualToString("document.documentElement.dir", "rtl"); | |
28 debug(""); | 29 debug(""); |
29 | 30 |
30 debug("Read document.body.dir in body"); | 31 debug("Read document.body.dir in body"); |
31 shouldBe("document.body.dir", "''"); | 32 shouldBeEqualToString("document.body.dir", ""); |
32 debug(""); | 33 debug(""); |
33 | 34 |
34 debug("Write document.dir in body"); | 35 debug("Write document.dir in body"); |
35 document.dir = "ltr"; | 36 document.dir = "ltr"; |
36 shouldBe("document.dir", "'ltr'"); | 37 shouldBeEqualToString("document.dir", "ltr"); |
38 debug(""); | |
39 | |
40 debug("Read document.documentElement.dir in body"); | |
41 shouldBeEqualToString("document.documentElement.dir", "ltr"); | |
37 debug(""); | 42 debug(""); |
38 | 43 |
39 debug("Read document.body.dir in body"); | 44 debug("Read document.body.dir in body"); |
40 shouldBe("document.body.dir", "'ltr'"); | 45 shouldBeEqualToString("document.body.dir", ""); |
41 debug(""); | 46 debug(""); |
42 </script> | 47 </script> |
43 </body> | 48 </body> |
44 </html> | 49 </html> |
OLD | NEW |