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

Side by Side Diff: third_party/WebKit/LayoutTests/intersection-observer/display-none.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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/intersection-observer/edge-inclusive-intersection.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 20 matching lines...) Expand all
31 entries = entries.concat(changes) 31 entries = entries.concat(changes)
32 }); 32 });
33 observer.observe(target); 33 observer.observe(target);
34 entries = entries.concat(observer.takeRecords()); 34 entries = entries.concat(observer.takeRecords());
35 assert_equals(entries.length, 0, "No initial notifications."); 35 assert_equals(entries.length, 0, "No initial notifications.");
36 runTestCycle(step0, "Intersecting notification after first rAF."); 36 runTestCycle(step0, "Intersecting notification after first rAF.");
37 }, "IntersectionObserver should send a not-intersecting notification for a targe t that gets display:none."); 37 }, "IntersectionObserver should send a not-intersecting notification for a targe t that gets display:none.");
38 38
39 function step0() { 39 function step0() {
40 runTestCycle(step1, "Not-intersecting notification after setting display:none on target."); 40 runTestCycle(step1, "Not-intersecting notification after setting display:none on target.");
41 checkLastEntry(entries, 0, [8, 108, 8, 108, 8, 108, 8, 108, 0, 800, 0, 600, ta rget]); 41 checkLastEntry(entries, 0, [8, 108, 8, 108, 8, 108, 8, 108, 0, 800, 0, 600, tr ue]);
42 target.style.display = "none"; 42 target.style.display = "none";
43 } 43 }
44 44
45 function step1() { 45 function step1() {
46 runTestCycle(step2, "Intersecting notification after removing display:none on target."); 46 runTestCycle(step2, "Intersecting notification after removing display:none on target.");
47 checkLastEntry(entries, 1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, target]); 47 checkLastEntry(entries, 1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false]);
48 target.style.display = ""; 48 target.style.display = "";
49 } 49 }
50 50
51 function step2() { 51 function step2() {
52 checkLastEntry(entries, 2, [8, 108, 8, 108, 8, 108, 8, 108, 0, 800, 0, 600, ta rget]); 52 checkLastEntry(entries, 2, [8, 108, 8, 108, 8, 108, 8, 108, 0, 800, 0, 600, tr ue]);
53 } 53 }
54 </script> 54 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/intersection-observer/edge-inclusive-intersection.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698