| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script> | 3 <script> |
| 4 var headReadDocumentDir = document.dir; | 4 var headReadDocumentDir = document.dir; |
| 5 document.dir = "rtl"; | 5 document.dir = "rtl"; |
| 6 var headWriteDocumentDir = document.dir; | 6 var headWriteDocumentDir = document.dir; |
| 7 </script> | 7 </script> |
| 8 </head> | 8 </head> |
| 9 <body> | 9 <body> |
| 10 <div id="description"></div> | 10 <div id="description"></div> |
| 11 <div id="console"></div> | 11 <div id="console"></div> |
| 12 <script src="../js/resources/js-test-pre.js"></script> | 12 <script src="../../resources/js-test.js"></script> |
| 13 <script> | 13 <script> |
| 14 description("This tests:<br>" | 14 description("This tests:<br>" |
| 15 + "Bug 9954 REGRESSION: document.dir should return empty string in <
;head><br>" | 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>"); | 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 | 17 |
| 18 debug("Read document.dir in head"); | 18 debug("Read document.dir in head"); |
| 19 shouldBe("headReadDocumentDir", "''"); | 19 shouldBe("headReadDocumentDir", "''"); |
| 20 debug(""); | 20 debug(""); |
| 21 | 21 |
| 22 debug("Write document.dir in head"); | 22 debug("Write document.dir in head"); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 35 document.dir = "ltr"; | 35 document.dir = "ltr"; |
| 36 shouldBe("document.dir", "'ltr'"); | 36 shouldBe("document.dir", "'ltr'"); |
| 37 debug(""); | 37 debug(""); |
| 38 | 38 |
| 39 debug("Read document.body.dir in body"); | 39 debug("Read document.body.dir in body"); |
| 40 shouldBe("document.body.dir", "'ltr'"); | 40 shouldBe("document.body.dir", "'ltr'"); |
| 41 debug(""); | 41 debug(""); |
| 42 </script> | 42 </script> |
| 43 </body> | 43 </body> |
| 44 </html> | 44 </html> |
| OLD | NEW |