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

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

Issue 1825443002: IntersectionObserver: omit thresholds attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix global-interface-listing expectations. Created 4 years, 9 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/observer-attributes-expected.txt » ('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 <div id="root"></div> 2 <div id="root"></div>
3 <script src="../resources/js-test.js"></script> 3 <script src="../resources/js-test.js"></script>
4 <script> 4 <script>
5 description("Test for observer attribute getters."); 5 description("Test for observer attribute getters.");
6 var rootDiv = document.getElementById("root"); 6 var rootDiv = document.getElementById("root");
7 7
8 var observer = new IntersectionObserver(function(e) {}, {}); 8 var observer = new IntersectionObserver(function(e) {}, {});
9 shouldBeNull("observer.root"); 9 shouldBeNull("observer.root");
10 shouldBe("observer.thresholds", "[0]");
11 shouldBeEqualToString("observer.rootMargin", "0px 0px 0px 0px"); 10 shouldBeEqualToString("observer.rootMargin", "0px 0px 0px 0px");
12 11
13 observer = new IntersectionObserver(function(e) {}, { 12 observer = new IntersectionObserver(function(e) {}, {
14 root: rootDiv, 13 root: rootDiv,
15 threshold: [0, 0.25, 0.5, 1.0], 14 threshold: [0, 0.25, 0.5, 1.0],
16 rootMargin: "10% 20px" 15 rootMargin: "10% 20px"
17 }); 16 });
18 shouldBe("observer.root", "rootDiv"); 17 shouldBe("observer.root", "rootDiv");
19 shouldBe("observer.thresholds", "[0, 0.25, 0.5, 1.0]");
20 shouldBeEqualToString("observer.rootMargin", "10% 20px 10% 20px"); 18 shouldBeEqualToString("observer.rootMargin", "10% 20px 10% 20px");
21 </script> 19 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/intersection-observer/observer-attributes-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698