New test files for the javascript diff driver.

Fixes the attribution issues as described in #2378.

The code was written by me a few years ago, but still follows modern JS coding style.

@arrbee: It looks like your diff driver does not pick up the following method definition pattern correctly:

```
Klass.prototype.method = function() {
  // ...
}
```