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

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

Issue 1669043002: Implement attribute getters for IntersectionObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix test expectation Created 4 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/intersection-observer/observer-attributes.html
diff --git a/third_party/WebKit/LayoutTests/intersection-observer/observer-attributes.html b/third_party/WebKit/LayoutTests/intersection-observer/observer-attributes.html
new file mode 100644
index 0000000000000000000000000000000000000000..322497f8265bdf93368839c318b5a1d1ce5673ea
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/intersection-observer/observer-attributes.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<div id="root"></div>
+<script src="../resources/js-test.js"></script>
+<script>
+ description("Test for observer attribute getters.");
+ var rootDiv = document.getElementById("root");
+
+ var observer = new IntersectionObserver(function(e) {}, {});
+ shouldBeNull("observer.root");
+ shouldBe("observer.thresholds", "[0]");
+ shouldBeEqualToString("observer.rootMargin", "0px 0px 0px 0px");
+
+ observer = new IntersectionObserver(function(e) {}, {
+ root: rootDiv,
+ threshold: [0, 0.25, 0.5, 1.0],
+ rootMargin: "10% 20px"
+ });
+ shouldBe("observer.root", "rootDiv");
+ shouldBe("observer.thresholds", "[0, 0.25, 0.5, 1.0]");
+ shouldBeEqualToString("observer.rootMargin", "10% 20px 10% 20px");
+</script>
« 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