All the above, plus:
Spin the wheels front and rear with them off the ground. This check hub bearings (noise, how freely it spins) plus freewheel/freehub on the rear; trueness of the wheels (wobble from side to side); brake adjustment (pads rubbing), and condition of the tyres (tread, perished sidewalls and pressure)
Rusty chain is not necessarily a deal-breaker, but may indicate the bike has been out in the rain and water has got into a multitude of other places (headset, bottom bracket, hubs, frame, forks). A seat post that won't move, as MichaelW says, is another bad indicator, and really is a deal-breaker.
Check there are no cracks or dents on the handlebars if they are aluminium alloy. Check around the stem clamp in particular. Dents and bumps in an aluminium frame are not good.
Hold the front brake on, clasp a hand around the top headset assembly (just under the stem) and try to move the bike backwards and forwards (just a little). The bike will stay stationary, but if the headset is clagged, you will feel movement in the assembly where you have your hand.
Check gearshift (your friend will have to ride it to do so). Stand to pedal in a mid-range gear. If the chain slips, you are up for full transmission replacement (chain, rear cogs at least). If you feel movement in the crank, there is a problem there with its fit on the spindle taper.
Any problems in these areas suggests the bike is not worth the money or effort, unless it is very rare, or you have access to cheap parts and labour.
Finally, and most importantly, make sure the bike fits. If you don't know how to determine this, PM me and I will send you a checklist, or you can do a search on BFs here. There is no point in buying a bike that is or close to mechanically perfect if it is too big or too small for your friend.