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

Delta Between Two Patch Sets: LayoutTests/imported/w3c/web-platform-tests/intersection-observer/observer-attributes.html

Issue 359780043: WIP for IO
Left Patch Set: Computed root bounds correctly. Now 13/24 WPTs pass Created 5 years, 8 months ago
Right Patch Set: 22 tests pass Created 5 years, 8 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 <script src="/resources/testharness.js"></script>
3 <script src="/resources/testharnessreport.js"></script>
4
5 <div id="root"></div>
6
7 <script>
8 test(function() {
9 var observer = new IntersectionObserver(function(e) {}, {});
10 test(function() { assert_equals(observer.root, null) },
11 "observer.root");
12 test(function() { assert_array_equals(observer.thresholds, [0]) },
13 "observer.thresholds");
14 test(function() { assert_equals(observer.rootMargin, "0px 0px 0px 0px") },
15 "observer.rootMargin");
16
17 var rootDiv = document.getElementById("root");
18 observer = new IntersectionObserver(function(e) {}, {
19 root: rootDiv,
20 threshold: [0, 0.25, 0.5, 1.0],
21 rootMargin: "10% 20px"
22 });
23 test(function() { assert_equals(observer.root, rootDiv) },
24 "set observer.root");
25 test(function() { assert_array_equals(observer.thresholds, [0, 0.25, 0.5, 1.0] ) },
26 "set observer.thresholds");
27 test(function() { assert_equals(observer.rootMargin, "10% 20px 10% 20px") },
28 "set observer.rootMargin");
29 }, "Observer attribute getters.");
30
31 </script>
LEFTRIGHT

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