Files
firefox/testing/web-platform/tests/intersection-observer/observer-exceptions.html
T
Ali Juma 72c8f8a1b1 Bug 1483091 [wpt PR 12453] - Fix typo in IntersectionObserver test observer-exceptions.html, a=testonly
Automatic update from web-platform-testsFix typo in IntersectionObserver test observer-exceptions.html

This fixes a typo in the description of a test case.

[email protected]

Change-Id: I485f41c68bfa747c794ef9add2b96b296cfdf73e
Reviewed-on: https://chromium-review.googlesource.com/1173151
Reviewed-by: Ali Juma <[email protected]>
Commit-Queue: Ali Juma <[email protected]>
Cr-Commit-Position: refs/heads/master@{#582686}

--

wpt-commits: ff811226ac0d1d785e5f67b0b4aaf7dd807a3064
wpt-pr: 12453
2018-08-15 16:50:49 +00:00

61 lines
1.9 KiB
HTML

<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(function () {
assert_throws(RangeError(), function() {
new IntersectionObserver(e => {}, {threshold: [1.1]})
})
}, "IntersectionObserver constructor with { threshold: [1.1] }");
test(function () {
assert_throws(TypeError(), function() {
new IntersectionObserver(e => {}, {threshold: ["foo"]})
})
}, 'IntersectionObserver constructor with { threshold: ["foo"] }');
test(function () {
assert_throws("SYNTAX_ERR", function() {
new IntersectionObserver(e => {}, {rootMargin: "1"})
})
}, 'IntersectionObserver constructor with { rootMargin: "1" }');
test(function () {
assert_throws("SYNTAX_ERR", function() {
new IntersectionObserver(e => {}, {rootMargin: "2em"})
})
}, 'IntersectionObserver constructor with { rootMargin: "2em" }');
test(function () {
assert_throws("SYNTAX_ERR", function() {
new IntersectionObserver(e => {}, {rootMargin: "auto"})
})
}, 'IntersectionObserver constructor with { rootMargin: "auto" }');
test(function () {
assert_throws("SYNTAX_ERR", function() {
new IntersectionObserver(e => {}, {rootMargin: "calc(1px + 2px)"})
})
}, 'IntersectionObserver constructor with { rootMargin: "calc(1px + 2px)" }');
test(function () {
assert_throws("SYNTAX_ERR", function() {
new IntersectionObserver(e => {}, {rootMargin: "1px !important"})
})
}, 'IntersectionObserver constructor with { rootMargin: "1px !important" }');
test(function () {
assert_throws("SYNTAX_ERR", function() {
new IntersectionObserver(e => {}, {rootMargin: "1px 1px 1px 1px 1px"})
})
}, 'IntersectionObserver constructor with { rootMargin: "1px 1px 1px 1px 1px" }');
test(function () {
assert_throws(TypeError(), function() {
let observer = new IntersectionObserver(c => {}, {});
observer.observe("foo");
})
}, 'IntersectionObserver.observe("foo")');
</script>