It used to be a lot easier with manual focus lenses. All of the above is great. My routine is as follows
First: Check the mount for wear, look for mounting scratches for a general indication of use. Make sure the contacts are clean and shiny (ish).
Second: Check the front element, small dinks and scratches cause a lot less problems then you think and are a great haggiling point.
Third: I look through the lens at a bright natural light source primarily for dust or Horror! mold. This is a more serious problem.
Fourth: Take a lot of pictures and check that it focuses correctly and if a USM without grinding sounds or jogging. Smooth action is what you want in all things.
Fifth: I feel for gritty feeling in the zoom or focus. Very Bad but occasionally fixable.
Six: wobbles... Stay away from loose and wobbily lenses.
Also: Try to avoid lenses that repairs are no longer supported by Canon, find out which ones they are and remember if something breaks you may not get the spares!
If a big big pro owned lens ask about service intervals, I am a CPS (now something else) member and the people I used to work for had tab at Fixation in London where I had everything serviced yearly. Remember visual wear and tear on L lenses often mean less than you would think. They are made for a hard life so dents and generally cosmetic wear and tear is often a lot less serious than sitting them on a shelf contacts down or abrasive cleaning. I have several lenses that look like they have been though all seven rings of hell, but the focus and glass is great. Then again I have a 50 1.4 that looks new, but I dropped, and is all kinds of wrong in focus.
Buy good, good lenses are repairable, quality primes and L glass, if you are looking at a battered and unhappy L think. A 3rd party, Second hand L is often the same price as say the same new Sigma.
Good luck!!!