JavaScript driven ref-tests for CSS Regions and resizing

The relevant bits are only in the  8523cda and fef2000 commits. The other are leftovers from a dangling pull request.

If anyone can help me how to get rid of those and have a clean way of doing pull requests, please shoot :)