JavaScript tests making clear the differences in implementation between different browsers