Also trim too long texts for small and large title.
Subsitute null values in parsed tag with default empty string.
Update api tests: Add LayoutTest suite for posted image layout validation.
Extract common test logic to base class.