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

@ -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() {