Permalink
Browse files

Warnings instead of errors for handleEvent (bug 795214)

  • Loading branch information...
mattbasta committed Oct 1, 2012
1 parent 87d69b9 commit 082591920a379a92f91728235c09a18be717dec8
Showing with 4 additions and 7 deletions.
  1. +1 −1 tests/test_js_instanceproperties.py
  2. +3 −6 validator/testcases/javascript/instanceproperties.py
@@ -134,7 +134,7 @@ def test_on_event_handleEvent_fail(self):
self.run_script("""
foo.onclick = {handleEvent: function() {alert("bar");}};
""")
- self.assert_failed(with_errors=True)
+ self.assert_failed(with_warnings=True)
def test_on_event_handleEvent_ignore(self):
"""
@@ -106,12 +106,9 @@ def set_on_event(new_value, traverser):
context=traverser.context)
elif (not is_literal and isinstance(new_value.value, jstypes.JSObject) and
"handleEvent" in new_value.value.data):
- mess_type = (traverser.err.error if
- traverser.err.supports_version(FX18_DEFINITION) else
- traverser.err.warning)
- mess_type(
- ("js", "on*", "handleEvent"),
- "`handleEvent` no longer implemented in Gecko 18.",
+ traverser.err.warning(
+ err_id=("js", "on*", "handleEvent"),
+ warning="`handleEvent` no longer implemented in Gecko 18.",
description="As of Gecko 18, objects with `handleEvent` methods "
"may no longer be assigned to `on*` properties. Doing "
"so will be equivalent to assigning `null` to the "

0 comments on commit 0825919

Please sign in to comment.