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

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

Issue 2401013002: Make MediaSession per frame as an attribute of Navigator (Closed)
Patch Set: split mojo tests 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>MediaImage interface</title> 2 <title>MediaImage interface</title>
3 <script src="../../resources/testharness.js"></script> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 <script> 5 <script>
6 console.warn("dummy log entry to avoid an empty -expected.txt in virtual/");
7
8 test(function() { 6 test(function() {
9 var image = new MediaImage({}); 7 var image = new MediaImage({});
10 assert_true(image != null); 8 assert_not_equals(image, null);
11 9
12 var exception = false; 10 var exception = false;
13 try { 11 try {
14 image = new MediaImage("foobar"); 12 image = new MediaImage("foobar");
15 } catch (e) { 13 } catch (e) {
16 exception = true; 14 exception = true;
17 } 15 }
18 assert_true(exception); 16 assert_true(exception);
19 17
20 exception = false; 18 exception = false;
(...skipping 18 matching lines...) Expand all
39 assert_equals(image.src, document.URL); 37 assert_equals(image.src, document.URL);
40 assert_equals(image.sizes, ''); 38 assert_equals(image.sizes, '');
41 assert_equals(image.type, ''); 39 assert_equals(image.type, '');
42 }, 'Test the default values for MediaImage'); 40 }, 'Test the default values for MediaImage');
43 41
44 test (function() { 42 test (function() {
45 var image = new MediaMetadata({ randomValueThatWillNotBeAdded: '... hopefull y ;)' }); 43 var image = new MediaMetadata({ randomValueThatWillNotBeAdded: '... hopefull y ;)' });
46 assert_equals(image.randomValueThatWillNotBeAdded, undefined); 44 assert_equals(image.randomValueThatWillNotBeAdded, undefined);
47 }, 'Test that passing unknown values to the dictionary is a no-op'); 45 }, 'Test that passing unknown values to the dictionary is a no-op');
48 </script> 46 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698