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

Side by Side Diff: LayoutTests/fast/dom/getElementById-consistency.html

Issue 9565015: Merge 108152 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/getElementById-consistency-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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../js/resources/js-test-pre.js"></script> 2 <script src="../js/resources/js-test-pre.js"></script>
3 <div id=container> 3 <div id=container>
4 </div> 4 </div>
5 <span id=el> 5 <span id=el>
6 </span> 6 </span>
7 <script> 7 <script>
8 description('Test that DOMSubtreeModified listeners cannot cause inDocument to b e incorrect'); 8 description('Test that DOMSubtreeModified listeners cannot cause inDocument to b e incorrect');
9 9
10 var counter = 0; 10 var counter = 0;
11 var container = document.getElementById('container'); 11 var container = document.getElementById('container');
12 var el = document.getElementById('el'); 12 var el = document.getElementById('el');
13 function broken() { 13 function broken() {
14 if (++counter > 2) { 14 if (++counter > 2) {
15 document.removeEventListener('DOMSubtreeModified', broken, true); 15 document.removeEventListener('DOMSubtreeModified', broken, true);
16 return; 16 return;
17 } 17 }
18 container.appendChild(el); 18 container.appendChild(el);
19 } 19 }
20 20
21 document.addEventListener("DOMSubtreeModified", broken, true); 21 document.addEventListener("DOMSubtreeModified", broken, true);
22 broken(); 22 broken();
23 shouldBeTrue("document.contains(document.getElementById('el'))"); 23 shouldBeTrue("document.contains(document.getElementById('el'))");
24 el.parentNode.removeChild(el); 24 el.parentNode.removeChild(el);
25 el = null; 25 el = null;
26 gc(); 26 gc();
27 shouldBeNull("document.getElementById('el')"); 27 shouldBeNull("document.getElementById('el')");
28 </script> 28 </script>
29 <script src="../js/resources/js-test-post.js"></script> 29 <script src="../js/resources/js-test-post.js"></script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/getElementById-consistency-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698