Closed
Bug 1107545
Opened 10 years ago
Closed 10 years ago
[EME] Test case for off-main-thread GMPStorage APIs
Categories
(Core :: Audio/Video, defect)
Core
Audio/Video
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: jwwang, Assigned: jwwang)
References
Details
Attachments
(2 files, 3 obsolete files)
12.18 KB,
patch
|
jwwang
:
review+
|
Details | Diff | Splinter Review |
8.64 KB,
patch
|
jwwang
:
review+
|
Details | Diff | Splinter Review |
Bug 1102607 makes GMPStorage APIs callable from all threads. Per bug 1102607 comment 14, we should have test cases for exercising the APIs in non-main threads.
Assignee | ||
Comment 1•10 years ago
|
||
Introduce a test manager to make storage tests scalable and easier to add more tests.
Assignee | ||
Comment 2•10 years ago
|
||
Add off-main-thread tests for GMPStorage APIs.
Attachment #8532092 -
Flags: review?(cpearce)
Updated•10 years ago
|
Attachment #8532090 -
Flags: review?(cpearce) → review+
Comment 3•10 years ago
|
||
Comment on attachment 8532092 [details] [diff] [review] 1107545_part2_add_off_main_thread_tests-v1.patch Review of attachment 8532092 [details] [diff] [review]: ----------------------------------------------------------------- r+ with nits fixed. ::: dom/media/gmp-plugin/gmp-test-decryptor.cpp @@ +363,5 @@ > + // Off-main-thread tests. > + if (g_platform_api->createthread(&thread) == GMPNoErr) { > + thread->Post(new TestStorageTask("thread1-", testManager)); > + thread->Join(); > + } I think we should fail the test of the createthread function fails. @@ +367,5 @@ > + } > + > + if (g_platform_api->createthread(&thread) == GMPNoErr) { > + thread->Post(new TestStorageTask("thread2-", testManager)); > + thread->Join(); I think we should run both these cases concurrently. So we should have thread1 and thread2 variables, and post the tasks to both, and then join the threads after the tasks have been posted.
Attachment #8532092 -
Flags: review?(cpearce) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Comment on attachment 8532092 [details] [diff] [review] 1107545_part2_add_off_main_thread_tests-v1.patch Review of attachment 8532092 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/media/gmp-plugin/gmp-test-decryptor.cpp @@ +363,5 @@ > + // Off-main-thread tests. > + if (g_platform_api->createthread(&thread) == GMPNoErr) { > + thread->Post(new TestStorageTask("thread1-", testManager)); > + thread->Join(); > + } By calling FakeDecryptor::Message("FAIL xxx") here? @@ +367,5 @@ > + } > + > + if (g_platform_api->createthread(&thread) == GMPNoErr) { > + thread->Post(new TestStorageTask("thread2-", testManager)); > + thread->Join(); Will do.
Comment 5•10 years ago
|
||
(In reply to JW Wang [:jwwang] from comment #4) > Comment on attachment 8532092 [details] [diff] [review] > 1107545_part2_add_off_main_thread_tests-v1.patch > > Review of attachment 8532092 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/media/gmp-plugin/gmp-test-decryptor.cpp > @@ +363,5 @@ > > + // Off-main-thread tests. > > + if (g_platform_api->createthread(&thread) == GMPNoErr) { > > + thread->Post(new TestStorageTask("thread1-", testManager)); > > + thread->Join(); > > + } > > By calling FakeDecryptor::Message("FAIL xxx") here? Yes.
Assignee | ||
Comment 6•10 years ago
|
||
Address nits in comment 3.
Attachment #8532092 -
Attachment is obsolete: true
Attachment #8532145 -
Flags: review+
Assignee | ||
Comment 7•10 years ago
|
||
Try: https://tbpl.mozilla.org/?tree=Try&rev=49e9268fc622
Assignee | ||
Comment 8•10 years ago
|
||
rebase.
Attachment #8532090 -
Attachment is obsolete: true
Attachment #8532379 -
Flags: review+
Assignee | ||
Comment 9•10 years ago
|
||
rebase. try for gtests: https://tbpl.mozilla.org/?tree=Try&rev=cfccbd820ac0
Attachment #8532145 -
Attachment is obsolete: true
Attachment #8532380 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 10•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/1185ff1ada05 https://hg.mozilla.org/integration/mozilla-inbound/rev/769d12f35376
Keywords: checkin-needed
Comment 11•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1185ff1ada05 https://hg.mozilla.org/mozilla-central/rev/769d12f35376
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in
before you can comment on or make changes to this bug.
Description
•