1. Disconnect the negative battery cable..
2. Remove the front map light..
3. Verify that the continuity between the sunroof switch terminals is as indicated in the table.

If not as indicated in the table, replace the sunroof switch.

Sunroof Switch Removal/InstallationExterior Care
The paintwork on your Mazda represents the latest technical developments in composition
and methods of application.
Environmental hazards, however, can harm the paint's protective properties, if
proper care is not taken.
Here are some examples of possible damage, with tips on how to preven ...
Torque Sensor
Purpose/ Function
The torque sensor detects the steering torque and the steering direction,
and outputs the signal to the Electric Power Steering (EPS) control module (CM).
Construction, Operation
The Hall IC-type torque sensor is installed to the top of the steering column
...
Rear Stabilizer Removal/Installation [Awd]
WARNING:
Verify that the rear crossmember is securely supported by a jack. If the
rear crossmember falls off, it can cause serious injury or death, and damage
to the vehicle.
CAUTION:
Performing the following procedures without first removing the rear ABS wheel-speed
s ...