Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / MutationObserver / observer-wrapper-dropoff-transient.html
blobb3ef1c8c3bd9f6daaee2e1b09e03244bfe25cf9d
1 <!DOCTYPE html>
3 <script src="../../../resources/js-test.js"></script>
5 <script>
6 description('MutationObserver wrappers should survive GC for passing into the callback even if JS has lost references and the only remaining observations are transient.');
8 jsTestIsAsync = true;
10 function addObserver(node, fn) {
11 var observer = new MutationObserver(fn);
12 observer.testProperty = true;
13 observer.observe(node, {attributes:true, subtree: true});
16 onload = function() {
17 var root = document.createElement('div');
18 var child = root.appendChild(document.createElement('span'));
19 addObserver(root, function(records, observer) {
20 window.observer = observer;
21 shouldBe('observer.testProperty', 'true');
22 finishJSTest();
23 });
25 root.removeChild(child);
26 child.setAttribute('foo', 'bar');
27 root = null;
29 gc();
31 </script>