England was 109 for four in its second innings at close on the third day, 237 runs ahead.
Alex Hales was unbeaten on 41, having been dropped on 19 and 39, with nightwatchman Steven Finn, missed on one, unbeaten on six.
England, 2-0 up in the three-match series, was 50 for three before first-innings century-maker Jonny Bairstow helped Hales add 52 for the fourth wicket.
Earlier, England all-rounder Chris Woakes started and finished a collapse that saw Sri Lanka, 162 for one overnight, dismissed for 288.
That gave England, which made 416 in the first innings, a lead of 128.
Woakes, who took a wicket with his first ball on Saturday, ended the innings with the opening delivery of a new spell when Eranga was caught in the slips. He returned three for 31 in 17.1 overs.
The second session saw England captain Alastair Cook off the field after being hit below his left knee while fielding close-in. (Courtesy AFP)