Here's my short version:
Buying Used Pistols:
In addition to looking down the bore to make sure it's not dark and murky, look at the muzzle and feed ramp areas for any burrs, or roughness.
Check the slide/bolt face for roughness and the extractor for burrs.
Cock the gun and put it on "safe". Pull the trigger with moderate pressure then take your finger off the trigger and release the safety. If the firing pin drops, it will need work to make it safe. *Ask the owner if you can dry-fire his gun before doing the next test.* With the gun cocked, pull the trigger to drop the firing pin, and hold it back while you rack the slide again to re-cock the pistol. Release the trigger and pull it again. You should hear the firing pin drop, if not the disconnector is not functioning correctly.
Check that the magazine locks in place easily. If it has a last shot hold open feature, test it by racking the slide with an empty magazine in place.
Remove the magazine and look closely at it's top to be sure the feed lips (the MAJOR source of feeding problems) don't show any signs of "adjusting". They should be smooth and evenly spaced.
Look at the screws and sights, any buggering here may be a bad sign of kitchen table 'smithing by the less than capable. Not always the case, but if you have another option for the model you're looking at...