Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(48)

Delta Between Two Patch Sets: LayoutTests/intersection-observer/root-element-deleted.html

Issue 359780043: WIP for IO
Left Patch Set: 20 tests pass Created 5 years, 8 months ago
Right Patch Set: Fix inline test while making sure the text test still passes too. Created 5 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
LEFTRIGHT
(no file at all)
1 <!DOCTYPE html>
2 <head>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <body>
6
7 <div id="root" style="position:absolute">
8 <div id="target" style="width: 100px; height: 100px; background-color: green "></div>
9 </div>
10
11 <script>
12 test(function() {
13 var root = document.getElementById('root');
14 var observer = new IntersectionObserver(function() {}, { root: document. getElementById('root') });;
15 var target = document.getElementById('target');
16 assert_equals(observer.root, root);
17 observer.observe(target);
18 assert_equals(internals.numberOfActiveIntersectionObservers(document), 1 );
19 root.parentNode.removeChild(root);
20 root = null;
21 target = null;
22 GCController.collect();
23 assert_equals(observer.root, null);
24 assert_equals(internals.numberOfActiveIntersectionObservers(document), 0 );
25 }, "IntersectionObserver doesn't keep unreachable root alive");
26 </script>
27 </body>
28 </html>
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b