| 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>
|
|
|