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 |
index 322497f8265bdf93368839c318b5a1d1ce5673ea..53f6acca5611119d833e915d224cd105a95b1a21 100644 |
--- a/third_party/WebKit/LayoutTests/intersection-observer/observer-attributes.html |
+++ b/third_party/WebKit/LayoutTests/intersection-observer/observer-attributes.html |
@@ -1,21 +1,31 @@ |
<!DOCTYPE html> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+ |
<div id="root"></div> |
-<script src="../resources/js-test.js"></script> |
-<script> |
- description("Test for observer attribute getters."); |
- var rootDiv = document.getElementById("root"); |
+<script> |
+test(function() { |
var observer = new IntersectionObserver(function(e) {}, {}); |
- shouldBeNull("observer.root"); |
- shouldBe("observer.thresholds", "[0]"); |
- shouldBeEqualToString("observer.rootMargin", "0px 0px 0px 0px"); |
+ test(function() { assert_equals(observer.root, null) }, |
+ "observer.root"); |
+ test(function() { assert_array_equals(observer.thresholds, [0]) }, |
+ "observer.thresholds"); |
+ test(function() { assert_equals(observer.rootMargin, "0px 0px 0px 0px") }, |
+ "observer.rootMargin"); |
+ var rootDiv = document.getElementById("root"); |
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"); |
+ test(function() { assert_equals(observer.root, rootDiv) }, |
+ "observer.root"); |
+ test(function() { assert_array_equals(observer.thresholds, [0, 0.25, 0.5, 1.0]) }, |
+ "observer.thresholds"); |
+ test(function() { assert_equals(observer.rootMargin, "10% 20px 10% 20px") }, |
+ "observer.rootMargin"); |
+}, "Observer attribute getters."); |
+ |
</script> |