Fixed test to close windows instead of maximizing them

Change-Id: I4c1bd7d8962f30cf756512e8d8e1f198b9604ec2