To answer this question, researchers measured the amount of THC in the blood of non-smokers who spent 3 hours in a well-ventilated space with people casually smoking marijuana. THC was present in the blood of the non-smokers, but the amount was well below the level needed to fail a drug test.
When the non-smokers were exposed for an hour to high-THC marijuana (11.3% THC concentration) in an unventilated room, they reported mild effects (a “contact high”) and displayed mild impairments on performance in motor tasks. In the hours directly following exposure, their urine tested positive for marijuana.