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

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

Issue 240243004: Update HTMLElement.dir / Document.dir to return only known values (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use fastGetAttribute Created 6 years, 8 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-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 26 matching lines...) Expand all
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>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/document-dir-property-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698