Move common logic to TestDocumentClipper.

Change-Id: If96b0f11553c1c7fe71e328641d637365f742fd2
2 files changed