| Index: third_party/WebKit/LayoutTests/fast/events/event-target-add-remove-listeners.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/events/event-target-add-remove-listeners.html b/third_party/WebKit/LayoutTests/fast/events/event-target-add-remove-listeners.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..34a958d5886bf9c4363adb8b17fb52d60ac34725
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/events/event-target-add-remove-listeners.html
|
| @@ -0,0 +1,30 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script>
|
| +
|
| +test(function() {
|
| + assert_throws(new TypeError(), function() {
|
| + document.addEventListener('click', false);
|
| + });
|
| + assert_throws(new TypeError(), function() {
|
| + document.addEventListener('click', 'foo');
|
| + });
|
| + assert_throws(new TypeError(), function() {
|
| + document.addEventListener('click', 3.14);
|
| + });
|
| +}, 'Throw a TypeError when the second argument of addEventListener is other than an object, null, or undefined');
|
| +
|
| +test(function() {
|
| + assert_throws(new TypeError(), function() {
|
| + document.removeEventListener('click', false);
|
| + });
|
| + assert_throws(new TypeError(), function() {
|
| + document.removeEventListener('click', 'foo');
|
| + });
|
| + assert_throws(new TypeError(), function() {
|
| + document.removeEventListener('click', 3.14);
|
| + });
|
| +}, 'Throw a TypeError when the second argument of removeEventListener is other than an object, null, or undefined');
|
| +
|
| +</script>
|
|
|