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

Side by Side Diff: third_party/WebKit/LayoutTests/intersection-observer/shadow-content.html

Issue 2662993002: [IntersectionObserver] Add isIntersecting field. (Closed)
Patch Set: webexposed Created 3 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 <script src="./resources/intersection-observer-test-utils.js"></script> 4 <script src="./resources/intersection-observer-test-utils.js"></script>
5 5
6 <style> 6 <style>
7 pre, #log { 7 pre, #log {
8 position: absolute; 8 position: absolute;
9 top: 0; 9 top: 0;
10 left: 200px; 10 left: 200px;
(...skipping 21 matching lines...) Expand all
32 var observer = new IntersectionObserver(function(changes) { 32 var observer = new IntersectionObserver(function(changes) {
33 entries = entries.concat(changes) 33 entries = entries.concat(changes)
34 }); 34 });
35 observer.observe(target); 35 observer.observe(target);
36 entries = entries.concat(observer.takeRecords()); 36 entries = entries.concat(observer.takeRecords());
37 assert_equals(entries.length, 0, "No initial notifications."); 37 assert_equals(entries.length, 0, "No initial notifications.");
38 runTestCycle(step0, "First rAF after creating shadow DOM."); 38 runTestCycle(step0, "First rAF after creating shadow DOM.");
39 }, "Observing a target inside shadow DOM."); 39 }, "Observing a target inside shadow DOM.");
40 40
41 function step0() { 41 function step0() {
42 checkLastEntry(entries, 0, [8, 108, 8, 108, 8, 108, 8, 108, 0, 800, 0, 600, ta rget]); 42 checkLastEntry(entries, 0, [8, 108, 8, 108, 8, 108, 8, 108, 0, 800, 0, 600, tr ue]);
43 } 43 }
44 </script> 44 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698