What safety requirements are there when designing an electronic device to go inside the cabin of an airliner?
A document called RTCA DO-160 defines the testing for a number of environmental requirements. Within each test standard is normally a number of different test conditions. The level of required testing is normally defined by the customer of the device, who has the task of showing the regulating body (FAA, EASA, etc) that this is sufficient to ensure the aircraft meets all regulatory requirements.
In addition, DO-254 gives guidance for electronic hardware and DO-178 handles software. There are other legacy documents like MIL-specs that define testing as well.