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

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

Issue 375293002: Node.insertBefore and Node.appendChild do not use custom binding anymore (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Replace assert with condition 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 element.offsetLeft; 99 element.offsetLeft;
100 }; 100 };
101 document.body.addEventListener('DOMSubtreeModified', mutationHandler, tr ue); 101 document.body.addEventListener('DOMSubtreeModified', mutationHandler, tr ue);
102 try { 102 try {
103 iframeDoc.body.insertBefore(element); 103 iframeDoc.body.insertBefore(element);
104 } catch (e) { 104 } catch (e) {
105 throw e; 105 throw e;
106 } finally { 106 } finally {
107 // Clear the event handler to avoid affecting the following tests. 107 // Clear the event handler to avoid affecting the following tests.
108 } 108 }
109 }); 109 }, "TypeError");
110 110
111 runTest(function() { 111 runTest(function() {
112 iframeDoc.body.appendChild(document.createElement('div')); 112 iframeDoc.body.appendChild(document.createElement('div'));
113 var element = elementInCurrentDocument('appendChild'); 113 var element = elementInCurrentDocument('appendChild');
114 // Make sure we don't crash if the element is moved back to the original document during the insertBefore call. 114 // Make sure we don't crash if the element is moved back to the original document during the insertBefore call.
115 var mutationHandler = function() { 115 var mutationHandler = function() {
116 document.body.removeEventListener('DOMSubtreeModified', mutationHand ler, true); 116 document.body.removeEventListener('DOMSubtreeModified', mutationHand ler, true);
117 document.body.appendChild(element); 117 document.body.appendChild(element);
118 // Access something on the element to see if it's in a valid state. 118 // Access something on the element to see if it's in a valid state.
119 element.offsetLeft; 119 element.offsetLeft;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
« no previous file with comments | « LayoutTests/fast/dom/Node/fragment-mutation.html ('k') | LayoutTests/fast/html/details-summary-document-child.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698