Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(746)

Side by Side Diff: third_party/WebKit/LayoutTests/intersection-observer/observer-exceptions.html

Issue 2791133002: bindings: Explicitly pass ValueType to toImplArray (Closed)
Patch Set: Fix tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 4
5 <script> 5 <script>
6 test(function () { 6 test(function () {
7 assert_throws(RangeError(), function() { 7 assert_throws(RangeError(), function() {
8 new IntersectionObserver(e => {}, {threshold: [1.1]}) 8 new IntersectionObserver(e => {}, {threshold: [1.1]})
9 }) 9 })
10 }, "IntersectionObserver constructor with { threshold: [1.1] }"); 10 }, "IntersectionObserver constructor with { threshold: [1.1] }");
11 11
12 test(function () { 12 test(function () {
13 assert_throws(RangeError(), function() { 13 assert_throws(TypeError(), function() {
14 new IntersectionObserver(e => {}, {threshold: ["foo"]}) 14 new IntersectionObserver(e => {}, {threshold: ["foo"]})
15 }) 15 })
16 }, 'IntersectionObserver constructor with { threshold: ["foo"] }'); 16 }, 'IntersectionObserver constructor with { threshold: ["foo"] }');
17 17
18 test(function () { 18 test(function () {
19 assert_throws("SYNTAX_ERR", function() { 19 assert_throws("SYNTAX_ERR", function() {
20 new IntersectionObserver(e => {}, {rootMargin: "1"}) 20 new IntersectionObserver(e => {}, {rootMargin: "1"})
21 }) 21 })
22 }, 'IntersectionObserver constructor witth { rootMargin: "1" }'); 22 }, 'IntersectionObserver constructor witth { rootMargin: "1" }');
23 23
(...skipping 15 matching lines...) Expand all
39 }) 39 })
40 }, 'IntersectionObserver constructor with { rootMargin: "1px 1px 1px 1px 1px" }' ); 40 }, 'IntersectionObserver constructor with { rootMargin: "1px 1px 1px 1px 1px" }' );
41 41
42 test(function () { 42 test(function () {
43 assert_throws(TypeError(), function() { 43 assert_throws(TypeError(), function() {
44 let observer = new IntersectionObserver(c => {}, {}); 44 let observer = new IntersectionObserver(c => {}, {});
45 observer.observe("foo"); 45 observer.observe("foo");
46 }) 46 })
47 }, 'IntersectionObserver.observe("foo")'); 47 }, 'IntersectionObserver.observe("foo")');
48 </script> 48 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698