Remove window creation in tests