gtk3 test: share common code