1. Remove the sunroof switch.
2. Inspect for continuity between the sunroof switch terminals using an ohmmeter.


Sunroof switch removal/installationMazda 6 Service Manual: Adaptive Front Lighting System (AFS) (Some models)
The adaptive front lighting system (AFS) automatically adjusts the headlight
beams to the left or right in conjunction with the operation of the steering wheel
after the headlights have been turned on and the vehicle speed is about 2 km/h (2
mph) or higher.
A system malfunction or operation c ...
Mazda 6 Service Manual: Power brake unit removal/installation
1. Remove the master cylinder. (See MASTER CYLINDER REMOVAL/INSTALLATION.)
2. Remove the wiper arm. (See WINDSHIELD WIPER ARM AND BLADE
REMOVAL/INSTALLATION.)
3. Remove the cowl grille. (See COWL GRILLE REMOVAL/INSTALLATION.)
4. Remove the wiper motor. (See WINDSHIELD WIPER MOTOR REMOVAL/INSTAL ...