bug 815002 implemented a framework for using testing audio/video devices in Mochitests and got them working on Linux. This bug covers getting something working on Windows. ucanvcam is a plausible candidate for video: https://code.google.com/p/ucanvcam/ I don't know about audio.
Poked around a bit more today after padenot asked about it, the ucanvcam source is on GitHub now: https://github.com/paulfitz/ucanvcam There's a demo audio source project here that generates static: https://github.com/rdp/directshow-demo-audio-input-open-source No license on the latter, but if it's usable out-of-the-box that might not be a problem.
Mass change P3->P4 to align with new Mozilla triage process.