Closed Bug 1055393 Opened 6 years ago Closed 5 years ago

[EME] Unit tests for GMPStorage

Categories

(Core :: Audio/Video, defect)

29 Branch
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla36
Tracking Status
firefox37 --- fixed
firefox38 --- fixed
firefox39 --- fixed

People

(Reporter: cpearce, Assigned: cpearce)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

We need unit tests for GMPStorage.

We need automated tests that test at least that:
* Reading an empty record returns 0 bytes.
* Writing and then reading a records work.
* Writing a record replaces its contents, truncating the length of the record to the new record's length. The new record's length can be 0.
* Storage for other origins should not be accessible.
* Storage works during async shutdown.
* Records cannot be opened by multiple clients at once.
* Using GMPStorage from non main thread fails.
* Private Browsing mode is respected. (Not sure if this is possible in a gtest.)
Blocks: 1032660
Depends on: 1044667
Assignee: nobody → cpearce
Depends on: 1060192
Attached patch Patch: Add gtests for GMPStorage (obsolete) — Splinter Review
Add continnuation-hell gtests for GMPStorage, including verifying private browsing mode and node id generation.
Attachment #8507623 - Flags: review?(edwin)
A few more details about the patch/tests:

* We send messages from parent to child GMP through GMPDecryptor, in order to instruct the child process which APIs to exercise and how.
* There's a basic "write some data etc" test that the child runs relatively autonomously, and other patches that test cross origin and PB mode which are driven from the parent.

Jesup: Are you OK with me adding a GMPDecryptor interface to the gmp-fake plugin that tests GMPStorage, rather than being a functioning decryptor?
Flags: needinfo?(rjesup)
Sure
Flags: needinfo?(rjesup)
try -a:
https://tbpl.mozilla.org/?tree=Try&rev=3e91ff2d58af

And hopefully with the B2G ICS Emulator build failure fixed:
https://tbpl.mozilla.org/?tree=Try&rev=59c9838064ae
Updated patch on top of changes in bug 1060192, as the gmp-clear-storage operation is no longer blocking, we have to wait for a gmp-clear-storage-complete notification before we can assume storage is cleared.

https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=359d5b580d3b
https://tbpl.mozilla.org/?tree=Try&rev=359d5b580d3b
Attachment #8507623 - Attachment is obsolete: true
Attachment #8507623 - Flags: review?(edwin)
Attachment #8507725 - Flags: review?(edwin)
OS: Windows 8.1 → All
Hardware: x86_64 → All
https://hg.mozilla.org/mozilla-central/rev/83667d52bfa1
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Mass update firefox-status to track EME uplift.
You need to log in before you can comment on or make changes to this bug.