Closed Bug 920595 Opened 13 years ago Closed 13 years ago

[MediaRecorder TEST] Add a test case to verify MediaRecorder state machine

Categories

(Core :: Audio/Video: Recording, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28
Tracking Status
firefox26 --- fixed
firefox27 --- fixed
firefox28 --- fixed
b2g-v1.2 --- fixed

People

(Reporter: u459114, Assigned: jsmith)

References

(Blocks 1 open bug)

Details

(Whiteboard: [qa-])

Attachments

(1 file, 1 obsolete file)

For example, Call requestData after stop/ pause should get DOM InvalidState error. Call resume/ pause after stop should get DOM InvalidState error. Call start after pause or stop should get DOM InvalidState error. Call stop after stop should get DOM InvalidState error.
I can't find a test case which is dedicate on this verification. Paul, do you have time to work on this?
Flags: needinfo?(pyang)
(In reply to C.J. Ku[:CJKu] from comment #1) > I can't find a test case which is dedicate on this verification. > Paul, do you have time to work on this? I think you are looking for me in this case - I own the testing of this API. Paul handles Web Audio, music player use cases, and Audio Channels. This is a good idea for a mochitest. I'm slammed with some 1.2 work right now, but I can look into this when I get some free time.
Blocks: 889772
No longer blocks: MediaRecording
Flags: needinfo?(pyang)
Started this, WIP patch coming shortly.
Assignee: nobody → jsmith
Status: NEW → ASSIGNED
Attached patch WIP Patch v1 (obsolete) — — Splinter Review
Attachment #814443 - Attachment is obsolete: true
Attached patch Patch v2 — — Splinter Review
Comment on attachment 814534 [details] [diff] [review] Patch v2 The mochitest seen here is passing locally and try when running through the ok statements. However, the mochitest appears to hang on shutdown locally and on try right now. Roc - Any ideas why?
Attachment #814534 - Flags: feedback?(roc)
I will have a check for this test script. BTW, what's the hang on shutdown means? Fail to destroy the process when close the browser?
Call stack shows stuck on: #0 0x00007f940642ad84 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0 #1 0x00007f94050de600 in PR_WaitCondVar (cvar=0x7f93d3e8e1c0, timeout=4294967295) at /media/ssd/B2G/gecko/nsprpub/pr/src/pthreads/ptsynch.c:385 #2 0x00007f94050dee0d in PR_Wait (mon=0x7f93d70f2350, timeout=4294967295) at /media/ssd/B2G/gecko/nsprpub/pr/src/pthreads/ptsynch.c:582 #3 0x00007f940076d8d6 in mozilla::ReentrantMonitor::Wait (this=0x7f93d3e3bec8, interval=4294967295) at /media/ssd/B2G/gecko/xpcom/glue/BlockingResourceBase.cpp:309 #4 0x00007f93fefd2eed in mozilla::OpusTrackEncoder::GetEncodedTrack (this=0x7f93d3e3beb0, aOutput=0x7f93d17fdbe0, aOutputDuration=@0x7f93d17fdbf0: 0) at /media/ssd/B2G/gecko/content/media/encoder/OpusTrackEncoder.cpp:242 #5 0x00007f93fefd16c1 in mozilla::MediaEncoder::GetEncodedData (this=0x7f93d3e8e200, aOutputBufs=0x7f93d17fdc50, aMIMEType=...) at /media/ssd/B2G/gecko/content/media/encoder/MediaEncoder.cpp:199 #6 0x00007f93fef9c423 in mozilla::dom::MediaRecorder::Session::Extract (this=0x7f93d3e8e140) at /media/ssd/B2G/gecko/content/media/MediaRecorder.cpp:255 #7 0x00007f93fef9bb01 in mozilla::dom::MediaRecorder::Session::ExtractRunnable::Run (this=0x7f93d4d37560) at /media/ssd/B2G/gecko/content/media/MediaRecorder.cpp:104 #8 0x00007f94007fd31a in nsThread::ProcessNextEvent (this=0x7f93d7232760, mayWait=true, result=0x7f93d17fdddf) at /media/ssd/B2G/gecko/xpcom/threads/nsThread.cpp:622 #9 0x00007f940077daa2 in NS_ProcessNextEvent (thread=0x7f93d7232760, mayWait=true) at /media/ssd/B2G/gecko/xpcom/glue/nsThreadUtils.cpp:238 #10 0x00007f94007fc196 in nsThread::ThreadFunc (arg=0x7f93d7232760) at /media/ssd/B2G/gecko/xpcom/threads/nsThread.cpp:250 #11 0x00007f94050e5d91 in _pt_root (arg=0x7f93d4adc890) at /media/ssd/B2G/gecko/nsprpub/pr/src/pthreads/ptthread.c:204 It seems Media Encoder thread can't exit on this test case. Please fire a bug.
Depends on: 924724
Comment on attachment 814534 [details] [diff] [review] Patch v2 Thanks for the help Randy. I filed bug 924724 in regards to the problem here. Clearing review for now - I'll wait for bug 924724 to have a patch before requesting review again.
Attachment #814534 - Flags: feedback?(roc)
Comment on attachment 814534 [details] [diff] [review] Patch v2 Review of attachment 814534 [details] [diff] [review]: ----------------------------------------------------------------- Dependency now has a confirmed working patch with the test passing & shutting down cleanly, so this is ready for review.
Attachment #814534 - Flags: review?(roc)
Keywords: checkin-needed
Actually, let me get a try run with the dependency patch included before I flag checkin-needed.
Keywords: checkin-needed
(In reply to Jason Smith [:jsmith] from comment #12) > https://tbpl.mozilla.org/?tree=Try&rev=d305e8cd3905 Hmm...maybe I didn't patch this right - this looks like Firefox is failing to shutdown again. I'll just wait for the dependency to land on central and I'll try again.
You may include my patch for this try run to verify the fix.
(In reply to Randy Lin [:rlin] from comment #14) > You may include my patch for this try run to verify the fix. Ignore this comment, I saw you has patched my fix.
Let's find out if the patch in bug 924724 fixes the issue. Try run below. https://tbpl.mozilla.org/?tree=Try&rev=f4ea8141ed5f
Try run is green - this is ready to land.
Keywords: checkin-needed
Summary: [MedaiRecorder TEST] Add a test case to verify MediaRecorder state machine → [MediaRecorder TEST] Add a test case to verify MediaRecorder state machine
(In reply to Ryan VanderMeulen [:RyanVM UTC-5] from comment #19) > https://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/9054fd176f74 Hmm...this probably shouldn't have landed on 1.2 yet, because the dependency here hasn't landed on 1.2 right now. This needs to be backed out of 1.2 until the dependency lands on 1.2. Otherwise, the tree will likely turn red on 1.2.
Flags: needinfo?(ryanvm)
Flags: needinfo?(ryanvm)
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
Component: Video/Audio → Video/Audio: Recording
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: