Their 4-1 victory courtesy of three goals inside the final 10 minutes means City have not dropped points in the league since drawing with West Bromwich Albion on 15 December and are now 15 points clear at the top of the table.
All three goals came in the second half, with Ronaldo getting his side's third when he finished off a quick counter-attack in the final minute.
England trail 2-1 heading into the fourth Test in Ahmedabad - which starts on Thursday - having beaten Sri Lanka 2-0 in January.
Madrid dominated the first half with Mariano and Raphael Varane heading off the bar in the space of two minutes.
The Brazilian rounded Fraser Forster to score his fifth goal in as many games as Carlo Ancelotti's side moved level on points with Liverpool and two points behind fourth-placed West Ham with a game in hand.
The 33-year-old Briton produced a gritty fightback to beat Dutch wildcard Robin Haase at the Rotterdam Open.
Blades goalkeeper Aaron Ramsdale produced a string of fine saves to frustrate Liverpool in the first half as the Reds' recent lack of cutting edge in front of goal looked set to continue.
Franck Kessie put Milan ahead from the penalty spot after Roma's Federico Fazio fouled Davide Calabria.
Ole Gunnar Solkjaer's side remain second but are now 12 points adrift of City while the result left Chelsea outside the top four a point behind West Ham United.
Lionel Messi scored and created the other as Barcelona beat in-form Sevilla and went within two points of La Liga leaders Atletico Madrid.