Moved the cairo specific test stuff to separate file.