sync commit with upstream

https://github.com/sstephenson/prototype/commit/0df1298f807818471209b7e7
971c3480e36a4f71
sync tests with upstream

https://github.com/sstephenson/prototype/commit/9d49b1bb4a6e85dd268e69db
f0f918900b449721
sync commit with upstream

https://github.com/sstephenson/prototype/commit/84a4d4fa2d868d5a0e08d683
a4bb6bf661e816b5