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

Side by Side Diff: sky/tests/mutation-observer/transient-gc-crash.sky

Issue 685623002: Move the tests from .html to .sky (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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="../../../resources/js-test.js"></script> 1 <script src="../../../resources/js-test.js"></script>
2 <script> 2 <script>
3 window.jsTestIsAsync = true; 3 window.jsTestIsAsync = true;
4 description('Clearing transient observers after observation node is GCed should not cause a crash.'); 4 description('Clearing transient observers after observation node is GCed should not cause a crash.');
5 5
6 function callback(mutations) { 6 function callback(mutations) {
7 window.mutations = mutations; 7 window.mutations = mutations;
8 } 8 }
9 var observer = new MutationObserver(callback); 9 var observer = new MutationObserver(callback);
10 10
11 var div = document.createElement('div'); 11 var div = document.createElement('div');
12 var span = div.appendChild(document.createElement('span')); 12 var span = div.appendChild(document.createElement('span'));
13 observer.observe(div, {attributes: true, subtree: true}); 13 observer.observe(div, {attributes: true, subtree: true});
14 div.removeChild(span); 14 div.removeChild(span);
15 div = null; 15 div = null;
16 gc(); 16 gc();
17 span.setAttribute('foo', 'bar'); 17 span.setAttribute('foo', 'bar');
18 setTimeout(function() { 18 setTimeout(function() {
19 shouldBe('mutations.length', '1'); 19 shouldBe('mutations.length', '1');
20 finishJSTest(); 20 finishJSTest();
21 }, 0); 21 }, 0);
22 </script> 22 </script>
OLDNEW
« no previous file with comments | « sky/tests/mutation-observer/transient-gc-crash.html ('k') | sky/tests/mutation-observer/weak-callback-gc-crash.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698