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

Side by Side Diff: LayoutTests/fast/dom/move-nodes-across-documents.html

Issue 374093002: Node.appendChild should throw TypeError when newChild is not an object (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix layout test Created 6 years, 5 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
OLDNEW
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
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698