Refactor GridLayout tests (#14044)

Change-Id: If297591d46979ce991921f9545ed04a0c2c92e41