If you ever thought about check layout specifications on different browsers and sizes, there is a framework called Galen, also you can code this framework on java or javascript. I don’t usually create layout tests that specific, but this is very useful since functional tests could pass even with the layout messed up.
Galen, validates the responsive design by checking the location of objects relatively to each other on page using a special syntax and rules.
Keep these tests together with your unit tests.
Java:
http://galenframework.com/docs/reference-java-tests/
There is an example of Galen with TestNg here:
https://github.com/galenframework/galen-sample-java-tests
Javascript:
http://galenframework.com/docs/reference-javascript-tests-guide/
A javascript example here:
https://github.com/galenframework/galen-sample-tests
and another here:
http://axatrikx.com/test-responsive-design-galen-framework/
Resources: