OLD | NEW |
1 <!DocType HTML> | 1 <!DocType HTML> |
2 <script> | 2 <script> |
3 if (window.testRunner) | 3 if (window.testRunner) |
4 testRunner.dumpAsText(); | 4 testRunner.dumpAsText(); |
5 | 5 |
6 var iframe, iframeDoc; | 6 var iframe, iframeDoc; |
7 | 7 |
8 function log(msg) | 8 function log(msg) |
9 { | 9 { |
10 document.getElementById('logger').innerHTML += msg + '\n'; | 10 document.getElementById('logger').innerHTML += msg + '\n'; |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 runTest(function() { | 172 runTest(function() { |
173 rangeInIframe().compareBoundaryPoints(Range.END_TO_END, rangeInCurrentDo
cument()); | 173 rangeInIframe().compareBoundaryPoints(Range.END_TO_END, rangeInCurrentDo
cument()); |
174 }, 'WrongDocumentError'); | 174 }, 'WrongDocumentError'); |
175 runTest(function() { | 175 runTest(function() { |
176 rangeInIframe().comparePoint(elementInCurrentDocument('comparePoint'), 0
); | 176 rangeInIframe().comparePoint(elementInCurrentDocument('comparePoint'), 0
); |
177 }, 'WrongDocumentError'); | 177 }, 'WrongDocumentError'); |
178 | 178 |
179 runTest(function() { | 179 runTest(function() { |
180 iframeDoc.appendChild(document.doctype); | 180 iframeDoc.appendChild(document.doctype); |
181 console.log(document.doctype); | 181 console.log(document.doctype); |
182 }, 'NotFoundError'); | 182 }, 'TypeError'); |
183 | 183 |
184 // When setting a boundary of the range in a different | 184 // When setting a boundary of the range in a different |
185 // document, the call should succeed and the range should be collapsed. | 185 // document, the call should succeed and the range should be collapsed. |
186 runTest(function() { | 186 runTest(function() { |
187 rangeInIframe().setStart(elementInCurrentDocument('setStart'), 0); | 187 rangeInIframe().setStart(elementInCurrentDocument('setStart'), 0); |
188 }); | 188 }); |
189 runTest(function() { | 189 runTest(function() { |
190 rangeInIframe().setEnd(elementInCurrentDocument('setEnd'), 0); | 190 rangeInIframe().setEnd(elementInCurrentDocument('setEnd'), 0); |
191 }); | 191 }); |
192 runTest(function() { | 192 runTest(function() { |
193 rangeInIframe().setStartBefore(elementInCurrentDocument('setStartBefore'
), 0); | 193 rangeInIframe().setStartBefore(elementInCurrentDocument('setStartBefore'
), 0); |
194 }); | 194 }); |
195 runTest(function() { | 195 runTest(function() { |
196 rangeInIframe().setStartAfter(elementInCurrentDocument('setStartAfter'),
0); | 196 rangeInIframe().setStartAfter(elementInCurrentDocument('setStartAfter'),
0); |
197 }); | 197 }); |
198 runTest(function() { | 198 runTest(function() { |
199 rangeInIframe().setEndBefore(elementInCurrentDocument('setEndBefore'), 0
); | 199 rangeInIframe().setEndBefore(elementInCurrentDocument('setEndBefore'), 0
); |
200 }); | 200 }); |
201 runTest(function() { | 201 runTest(function() { |
202 rangeInIframe().setEndAfter(elementInCurrentDocument('setEndAfter'), 0); | 202 rangeInIframe().setEndAfter(elementInCurrentDocument('setEndAfter'), 0); |
203 }); | 203 }); |
204 runTest(function() { | 204 runTest(function() { |
205 rangeInIframe().isPointInRange(elementInCurrentDocument('isPointInRange'
), 0); | 205 rangeInIframe().isPointInRange(elementInCurrentDocument('isPointInRange'
), 0); |
206 }); | 206 }); |
207 | 207 |
208 } | 208 } |
209 </script> | 209 </script> |
210 <pre id='logger'></pre> | 210 <pre id='logger'></pre> |
211 <iframe onload='run()'></iframe> | 211 <iframe onload='run()'></iframe> |
OLD | NEW |