Closed Bug 1055393 Opened 6 years ago Closed 5 years ago

[EME] Unit tests for GMPStorage


(Core :: Audio/Video, defect)

29 Branch
Not set



Tracking Status
firefox37 --- fixed
firefox38 --- fixed
firefox39 --- fixed


(Reporter: cpearce, Assigned: cpearce)


(Blocks 1 open bug)



(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)
Flags: needinfo?(rjesup)
try -a:

And hopefully with the B2G ICS Emulator build failure fixed:
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.
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
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.