|
22 | 22 | height: 100px; |
23 | 23 | width: 200px; |
24 | 24 | } |
| 25 | + |
| 26 | + .scroll-x { |
| 27 | + overflow-y: auto; |
| 28 | + height: 100px; |
| 29 | + width: 200px; |
| 30 | + } |
25 | 31 | </style> |
26 | 32 | </head> |
27 | 33 |
|
|
92 | 98 | </div> |
93 | 99 | </div> |
94 | 100 |
|
| 101 | +<div class="scroll-x"> |
| 102 | + <div id="test5"> |
| 103 | + Contrary to popular belief, Lorem Ipsum is not simply random text. It has |
| 104 | + roots in a piece of classical Latin literature from 45 BC, making it over |
| 105 | + 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney |
| 106 | + College in Virginia, looked up one of the more obscure Latin words, |
| 107 | + consectetur, from a Lorem Ipsum passage, and going through the cites of |
| 108 | + the word in classical literature, discovered the undoubtable source. Lorem |
| 109 | + Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum |
| 110 | + et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 |
| 111 | + BC. This book is a treatise on the theory of ethics, very popular during |
| 112 | + the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit |
| 113 | + amet..", comes from a line in section 1.10.32. |
| 114 | + </div> |
| 115 | +</div> |
| 116 | + |
95 | 117 | <script src="scrollparent.js"></script> |
96 | 118 | <script> |
97 | 119 | var equal = function (a, b) { |
|
101 | 123 | var assertion = 0; |
102 | 124 |
|
103 | 125 | console.log("TAP version 13"); |
104 | | -console.log("1..4"); |
| 126 | +console.log("1..5"); |
105 | 127 |
|
106 | 128 | equal(Scrollparent(document.getElementById("test1")).className, "scroll"); |
107 | 129 |
|
108 | 130 | equal(Scrollparent(document.getElementById("test2")), window); |
109 | 131 | equal(Scrollparent(document.getElementById("test3")), window); |
110 | 132 |
|
111 | 133 | equal(Scrollparent(document.getElementById("test4")).className, "scroll-y"); |
| 134 | +equal(Scrollparent(document.getElementById("test5")).className, "scroll-x"); |
112 | 135 | </script> |
113 | 136 | </body> |
114 | 137 | </html> |
0 commit comments