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

Side by Side Diff: LayoutTests/fast/dom/MutationObserver/clear-transient-without-delivery.html

Issue 12317072: Merge 143386 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 10 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 <script src="../../js/resources/js-test-pre.js"></script> 1 <script src="../../js/resources/js-test-pre.js"></script>
2 <script> 2 <script>
3 window.jsTestIsAsync = true; 3 window.jsTestIsAsync = true;
4 description('Transient registrations should be cleared even without delivery.'); 4 description('Transient registrations should be cleared even without delivery.');
5 5
6 var mutationsDelivered = false; 6 var mutationsDelivered = false;
7 function callback(mutations) { 7 function callback(mutations) {
8 mutationsDelivered = true; 8 mutationsDelivered = true;
9 } 9 }
10 var observer = new WebKitMutationObserver(callback); 10 var observer = new MutationObserver(callback);
11 11
12 var div = document.createElement('div'); 12 var div = document.createElement('div');
13 var span = div.appendChild(document.createElement('span')); 13 var span = div.appendChild(document.createElement('span'));
14 observer.observe(div, {attributes: true, subtree: true}); 14 observer.observe(div, {attributes: true, subtree: true});
15 div.removeChild(span); 15 div.removeChild(span);
16 setTimeout(function() { 16 setTimeout(function() {
17 // By the time this function runs the transient registration should be clear ed, 17 // By the time this function runs the transient registration should be clear ed,
18 // so we expect not to be notified of this attribute mutation. 18 // so we expect not to be notified of this attribute mutation.
19 span.setAttribute('bar', 'baz'); 19 span.setAttribute('bar', 'baz');
20 setTimeout(function() { 20 setTimeout(function() {
21 shouldBeFalse('mutationsDelivered'); 21 shouldBeFalse('mutationsDelivered');
22 finishJSTest(); 22 finishJSTest();
23 }, 0); 23 }, 0);
24 }, 0); 24 }, 0);
25 </script> 25 </script>
26 <script src="../../js/resources/js-test-post.js"></script> 26 <script src="../../js/resources/js-test-post.js"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698