style: Add some more tests for disallowed rootMargin values.

This commit is contained in:
Cameron McCormack 2017-10-17 15:08:52 +08:00 committed by Emilio Cobos Álvarez
parent ac74cd57a2
commit 893415c85a
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 19 additions and 2 deletions

View file

@ -557079,7 +557079,7 @@
"testharness"
],
"intersection-observer/observer-exceptions.html": [
"28ccc6905713894b43033e30949170439215bf2e",
"85d5416475091c1020e0ff92b15f841bf58c606e",
"testharness"
],
"intersection-observer/observer-in-iframe.html": [

View file

@ -31,7 +31,19 @@ test(function () {
assert_throws("SYNTAX_ERR", function() {
new IntersectionObserver(e => {}, {rootMargin: "auto"})
})
}, 'IntersectionObserver constructor width { 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() {