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

Side by Side Diff: third_party/WebKit/LayoutTests/media/mediasession/mediaartwork.html

Issue 2394223002: Rename MediaArtwork -> MediaImage (Closed)
Patch Set: rebased Created 4 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>MediaArtwork interface</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script>
6 console.warn("dummy log entry to avoid an empty -expected.txt in virtual/");
7
8 test(function() {
9 var artwork = new MediaArtwork({});
10 assert_true(artwork != null);
11
12 var exception = false;
13 try {
14 artwork = new MediaArtwork("foobar");
15 } catch (e) {
16 exception = true;
17 }
18 assert_true(exception);
19
20 exception = false;
21 try {
22 artwork = new MediaArtwork(42);
23 } catch (e) {
24 exception = true;
25 }
26 assert_true(exception);
27 }, 'Test that MediaArtwork is constructed using a dictionary');
28
29 test (function() {
30 var artwork = new MediaArtwork({
31 src: 'foo', sizes: 'bar', type: 'plop'});
32 assert_greater_than(artwork.src.indexOf('foo'), -1);
33 assert_equals(artwork.sizes, 'bar');
34 assert_equals(artwork.type, 'plop');
35 }, 'Test the different values allowed in MediaArtwork init dictionary');
36
37 test (function() {
38 var artwork = new MediaArtwork({});
39 assert_equals(artwork.src, document.URL);
40 assert_equals(artwork.sizes, '');
41 assert_equals(artwork.type, '');
42 }, 'Test the default values for MediaArtwork');
43
44 test (function() {
45 var artwork = new MediaMetadata({ randomValueThatWillNotBeAdded: '... hopefu lly ;)' });
46 assert_equals(artwork.randomValueThatWillNotBeAdded, undefined);
47 }, 'Test that passing unknown values to the dictionary is a no-op');
48 </script>
OLDNEW
« no previous file with comments | « content/public/common/media_metadata.h ('k') | third_party/WebKit/LayoutTests/media/mediasession/mediaartwork-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698