Given a class C of graphs and a fixed graph H, the online Ramsey game for H on is a game between two players Builder and Painter as follows: an unbounded set of vertices is given as an initial state, and on each turn Builder introduces a new edge with the constraint that the resulting graph must be in, and Painter colors the new edge either red or blue. Builder wins the game if Painter is forced to make a monochromatic copy of H at some point in the game. Otherwise, Painter can avoid creating a monochromatic copy of H forever, and we say Painter wins the game. We initiate the study of characterizing the graphs F such that for a given graph H, Painter wins the online Ramsey game for H on F-free graphs. We characterize all graphs F such that Painter wins the online Ramsey game for C-3 on the class of F-free graphs, except when F is one particular graph. We also show that Painter wins the online Ramsey game for C-3 on the class of K-4-minor-free graphs, extending a result by Grytczuk, Haluszczak, and Kierstead [Electron. J. Combin. 11 (2004), p. 60].