added spec for visibilitychange event