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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/MutationObserver/weak-callback-gc-crash.html

Issue 1950613005: Fixes tests that use internals.observeGC to work with Ignition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 <div>Test passes if it does not crash</div> 2 <div>Test passes if it does not crash</div>
3 <script src="../../../resources/gc.js"></script> 3 <script src="../../../resources/gc.js"></script>
4 <script> 4 <script>
5 if (window.testRunner) { 5 if (window.testRunner) {
6 testRunner.waitUntilDone(); 6 testRunner.waitUntilDone();
7 testRunner.dumpAsText(); 7 testRunner.dumpAsText();
8 } 8 }
9 var observer = new MutationObserver(function() {console.log('Should not appear') }); 9 var observer, div;
10 var div = document.createElement('div'); 10 function initializeObserver() {
11 observer.observe(div, {attributes: true}); 11 observer = new MutationObserver(function() {console.log('Should not appear')}) ;
12 div.id = 'foo'; 12 div = document.createElement('div');
13 observer.observe(div, {attributes: true});
14 div.id = 'foo';
15 }
16
17 initializeObserver();
13 div = null; 18 div = null;
14 observer = null; 19 observer = null;
15 gc(); 20 gc();
16 setTimeout(function() { testRunner.notifyDone(); }, 0); 21 setTimeout(function() { testRunner.notifyDone(); }, 0);
17 </script> 22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698