Change compositing/gestures tests to avoid a one pixel difference

Change the compositing/gestures tests to avoid a problem where one pixel
is one shade of green lighter due to the underline bleeding through the
rounded corners of the rect. Also change position/size calculation to
use getBoundingClientRect which is faster and more reliable.

BUG=378610
R=dglazkov@chromium.org

Review URL: https://codereview.chromium.org/322253004

git-svn-id: svn://svn.chromium.org/blink/trunk@175961 bbb929c8-8fbe-4397-9dbb-9b2b20218538