bug fix
(cherry picked from commit d8f74cf86644ff338aff53879f674b971c11967e)
more bug fix
Updatign tests
[FIXED JENKINS-18585]

The earlier fix by @ssogabe broke the test. This fix corrects the
problem properly.

The reason this error happens with some plugins is that if there's an
input field whose name is "on", then even after prototype.js extends
an element object, "form.on" will refer to the input element, not the
prototype.js function to add an event handler.
Ignore generated files