If the 49ers are fortunate, it will be the last in-game pass Gabbert throws this season.

With Colin Kaepernick among 19 of the 49ers’ starters taking the fourth preseason game off Thursday night, Gabbert did little to inspire confidence he could capably handle the starting role in a meaningful game.

In a 40-13 win over the Texans, Gabbert finished his lackluster preseason by completing 4 of 11 passes for 60 yards and a touchdown against a defense that rested eight starters. He salvaged respectability – and an 85.4 passer rating – by directing a 12-play, 84-yard scoring drive he capped with a 14-yard pass to tight end Asante Cleveland on his fifth and final series.

Gabbert opened by completing 1 of 6 passes for 11 yards and the 49ers had two first downs and four punts on his first four series. He finished the preseason with a 46.8 completion percentage (22 of 47) and a 54.1 passer rating, while his 17 drives included two interceptions, two touchdowns and 10 punts.

Jim Harbaugh has consistently batted down any suggestion Gabbert’s hold on the No. 2 could be in jeopardy this summer and finances could be a factor: Gabbert’s $2 million salary is fully guaranteed and he would count against the salary cap if released.

There is also the matter of the 49ers lacking a compelling alternative option.

Their No. 3 quarterback this summer has been Josh Johnson, who has played for three teams since 2011, when he threw his last regular-season pass.

On Thursday, Johnson, who sparkled in the 2012 exhibition finale for the 49ers but was cut two days later, made another spirited last-ditch case for a roster spot. The five-year veteran completed 14 of 17 passes for 135 yards with three touchdowns and an interception.

On his first snap, Johnson threw a 13-yard, second-quarter touchdown pass to rookie wide receiver Bruce Ellington, and added scoring tosses of 5 and 2 yards to tight end Kyle Nelson in the fourth quarter. He did throw an off-target pass intended for wideout L’Damian Washington, whose poor effort contributed to a 77-yard interception return for a touchdown by cornerback Andre Hal in the third quarter.

In the preseason, Johnson completed 27 of 36 passes for 259 yards with three touchdowns, one interception and two lost fumbles.

On defense, rookie linebacker Chris Borland made his case for a Week 1 starting spot. Borland had a 34-yard interception return for a touchdown in the third quarter and added a team-high six tackles.

Ellington had three catches for 35 yards and weaved through a sea of Texans on a 44-yard punt return in the fourth quarter.