Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(636)

Unified Diff: third_party/WebKit/LayoutTests/media/mediasession/mediaartwork.html

Issue 2013813002: Implement MediaMetadata artwork in Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/mediasession/mediaartwork-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/mediasession/mediaartwork.html
diff --git a/third_party/WebKit/LayoutTests/media/mediasession/mediaartwork.html b/third_party/WebKit/LayoutTests/media/mediasession/mediaartwork.html
new file mode 100644
index 0000000000000000000000000000000000000000..9cb813df43dfb21bd07974ce37778cb8413ea2be
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/mediasession/mediaartwork.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<title>MediaArtwork interface</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+ console.warn("dummy log entry to avoid an empty -expected.txt in virtual/");
+
+ test(function() {
+ var artwork = new MediaArtwork({});
+ assert_true(artwork != null);
+
+ var exception = false;
+ try {
+ artwork = new MediaArtwork("foobar");
+ } catch (e) {
+ exception = true;
+ }
+ assert_true(exception);
+
+ exception = false;
+ try {
+ artwork = new MediaArtwork(42);
+ } catch (e) {
+ exception = true;
+ }
+ assert_true(exception);
+ }, 'Test that MediaArtwork is constructed using a dictionary');
+
+test (function() {
+ var artwork = new MediaArtwork({
+ src: 'foo', sizes: 'bar', type: 'plop'});
+ assert_greater_than(artwork.src.indexOf('foo'), -1);
+ assert_equals(artwork.sizes, 'bar');
+ assert_equals(artwork.type, 'plop');
+}, 'Test the different values allowed in MediaArtwork init dictionary');
+
+test (function() {
+ var artwork = new MediaArtwork({});
+ assert_equals(artwork.src, document.URL);
+ assert_equals(artwork.sizes, '');
+ assert_equals(artwork.type, '');
+}, 'Test the default values for MediaArtwork');
+
+test (function() {
+ var artwork = new MediaMetadata({ randomValueThatWillNotBeAdded: '... hopefully ;)' });
+ assert_equals(artwork.randomValueThatWillNotBeAdded, undefined);
+}, 'Test that passing unknown values to the dictionary is a no-op');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/mediasession/mediaartwork-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698