I'm not 100% sure that unload will fire. My testing showed that beforeUnload fired, but unload did not seem to do so. OTOH, I was using window.alert as my check, so possible the window was just invalid by then.

However, I would not disable the radio on unload. Again, test page should do nothing it hasn't explicitly been told to do. We should remove the event handlers though.