Adding test cases and complying with webkit coding style