Firefox existed before Mozilla's contracts with Google. Firefox was actually funded by AOL (to the tune of a couple million in sending off money when they shuttered Netscape) and Mitch Kapor (hundreds of thousands because he's a great guy who saw the potential) with some other donations from IBM, Oracle, and a few more big tech players.