This repository has been archived by the owner on Aug 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1580602 - P2: Implement MediaMetadata API. r=bzbarsky
Implement the MediaMetadata interface. The API will be enabled behind a pref. Depends on D45456 Differential Revision: https://phabricator.services.mozilla.com/D45457
- Loading branch information
1 parent
1ea2222
commit 006925f
Showing
8 changed files
with
192 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 1 addition & 51 deletions
52
testing/web-platform/meta/mediasession/mediametadata.html.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,2 @@ | ||
prefs: [dom.media.mediasession.enabled:true] | ||
[mediametadata.html] | ||
[Test that mediaSession.metadata is properly set] | ||
expected: FAIL | ||
|
||
[Test that changes to metadata propagate properly] | ||
expected: FAIL | ||
|
||
[Test that resetting metadata to null is reflected] | ||
expected: FAIL | ||
|
||
[Test that MediaMetadata is constructed using a dictionary] | ||
expected: FAIL | ||
|
||
[Test that MediaMetadata constructor can take no parameter] | ||
expected: FAIL | ||
|
||
[Test the different values allowed in MediaMetadata init dictionary] | ||
expected: FAIL | ||
|
||
[Test the default values for MediaMetadata with empty init dictionary] | ||
expected: FAIL | ||
|
||
[Test the default values for MediaMetadata with no init dictionary] | ||
expected: FAIL | ||
|
||
[Test that passing unknown values to the dictionary is a no-op] | ||
expected: FAIL | ||
|
||
[Test that MediaMetadata is read/write] | ||
expected: FAIL | ||
|
||
[Test that MediaMetadat.artwork can't be modified] | ||
expected: FAIL | ||
[Test that MediaMetadata.artwork will not expose unknown properties] | ||
expected: FAIL | ||
[Test that MediaMetadata.artwork is Frozen] | ||
expected: FAIL | ||
[Test that MediaMetadata.artwork returns parsed urls] | ||
expected: FAIL | ||
[Test that MediaMetadata throws when setting an invalid url] | ||
expected: FAIL | ||
[Test MediaImage default values] | ||
expected: FAIL | ||
[Test that MediaImage.src is required] | ||
expected: FAIL | ||
18 changes: 18 additions & 0 deletions
18
testing/web-platform/tests/mediasession/helper/artwork-generator.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<title>MediaImage</title> | ||
<script> | ||
function createArtworkFromURLs(sources) { | ||
let artwork = []; | ||
for (const source of sources) { | ||
artwork.push({ | ||
src: source | ||
}); | ||
} | ||
|
||
let metadata = new MediaMetadata({ | ||
artwork: artwork | ||
}); | ||
return metadata.artwork; | ||
} | ||
|
||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters