(In reply to Munro Mengjue Chiang [:mchiang] from comment #8)
> Florian,
>
> From the log[1], I found the callback eventCallback[2] is never called after
> we call chromeDoc.defaultView.PopupNotifications.show[3].
I'm not sure that's relevant.
> Then mochitest
> timed out while waiting for the event getUserMedia:response:allow. Any idea?
How do you know if we timeout waiting for "getUserMedia:response:allow", or "recording-device-events", or both? (But I would also guess it's getUserMedia:response:allow)
I wonder if it would be possible that in the case where we don't show the prompt, the "getUserMedia:response:allow" notification would sometime be sent before we return from 'yield promiseObserverCalled("getUserMedia:request")' (which requires an exchange of asynchronous messages between the parent and child processes).
Seeing that this failure started happening after we resolved bug 1332516, I'm tempted to say there was an issue with that patch.
I would revert the patch from bug 1332516 and try this:
promise = promiseObserverCalled("getUserMedia:response:allow");
yield promiseRequestDevice(true, true, null, null, win.gBrowser.selectedBrowser);
yield promiseObserverCalled("getUserMedia:request");
yield promiseNoPopupNotification("webRTC-shareDevices");
yield promise;
yield expectObserverCalled("recording-device-events");
For your next try run, please limit the tests to browser/base/content/test/webrtc using:
--try-test-paths browser-chrome:browser/base/content/test/webrtc

(In reply to Munro Mengjue Chiang [:mchiang] from comment #12)
> After modifying the mochitest, the test result [2] still shows the same
> symptom.
The results seem very different to me.
On your previous try push, you had 7 failures out of 20 runs without e10s, and 0 failure with e10s (not completely sure my count is right, because there's the browser_verify_content_about_newtab.js failure that adds noise to these results).
On the new push, you have 0 failure out of 107 runs without e10s, and 1 failure out of 147 runs with e10s.
So that's 1 failure out of 250+ runs; probably below the threshold where we would start investing time in debugging.

142 failures in 836 pushes (0.17 failures/push) were associated with this bug in the last 7 days.
This is the #11 most frequent failure this week.
** This failure happened more than 30 times this week! Resolving this bug is a high priority. **
** Try to resolve this bug as soon as possible. If unresolved for 2 weeks, the affected test(s) may be disabled. **
Repository breakdown:
* autoland: 54
* mozilla-inbound: 38
* mozilla-aurora: 20
* mozilla-central: 17
* graphics: 8
* try: 5
Platform breakdown:
* windows8-64: 142
For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1334752&startday=2017-02-06&endday=2017-02-12&tree=all

107 failures in 833 pushes (0.128 failures/push) were associated with this bug in the last 7 days.
This is the #19 most frequent failure this week.
** This failure happened more than 30 times this week! Resolving this bug is a high priority. **
** Try to resolve this bug as soon as possible. If unresolved for 2 weeks, the affected test(s) may be disabled. **
Repository breakdown:
* autoland: 59
* mozilla-inbound: 28
* mozilla-central: 9
* try: 4
* mozilla-aurora: 4
* graphics: 3
Platform breakdown:
* windows8-64: 89
* osx-10-10: 18
For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1334752&startday=2017-02-13&endday=2017-02-19&tree=all

100 failures in 812 pushes (0.123 failures/push) were associated with this bug in the last 7 days.
This is the #14 most frequent failure this week.
** This failure happened more than 30 times this week! Resolving this bug is a high priority. **
** Try to resolve this bug as soon as possible. If unresolved for 2 weeks, the affected test(s) may be disabled. **
Repository breakdown:
* mozilla-inbound: 37
* autoland: 22
* mozilla-aurora: 19
* mozilla-central: 12
* try: 5
* graphics: 5
Platform breakdown:
* windows8-64: 100
For more details, see:
https://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=1334752&startday=2017-02-20&endday=2017-02-26&tree=all