Yes, this is the case unless you're downloading something (eg: listening to internet radio).
You can test it by opening a command console on Windows (assuming the computer is on the same network as your phone) and typing in "ping -t <your phone's IP address>" - not sure if Macs have something similar.
After about 40 seconds or so of being locked the phone will stop replying to ping requests, because it has disconnected from WiFi to save battery. The battery saving logic is flawed when you have a crappy signal though.