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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/MediaElementAudioSource/mediaelementaudiosourcenode.html

Issue 2825113002: Add [SameObject] for Media{Element,Stream}AudioSourceNode (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/MediaStreamAudioSource/mediastreamaudiosourcenode.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <html> 3 <html>
4 <head> 4 <head>
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 <script src="../resources/audit-util.js"></script> 7 <script src="../resources/audit-util.js"></script>
8 <script src="../resources/audit.js"></script> 8 <script src="../resources/audit.js"></script>
9 </head> 9 </head>
10 10
(...skipping 25 matching lines...) Expand all
36 .throw('TypeError'); 36 .throw('TypeError');
37 should( 37 should(
38 () => audioNode.connect(context.destination, 5, 0), 38 () => audioNode.connect(context.destination, 5, 0),
39 'audioNode.connect(context.destination, 5, 0)') 39 'audioNode.connect(context.destination, 5, 0)')
40 .throw('IndexSizeError'); 40 .throw('IndexSizeError');
41 should( 41 should(
42 () => audioNode.connect(context.destination, 0, 5), 42 () => audioNode.connect(context.destination, 0, 5),
43 'audioNode.connect(context.destination, 0, 5)') 43 'audioNode.connect(context.destination, 0, 5)')
44 .throw('IndexSizeError'); 44 .throw('IndexSizeError');
45 45
46 // Verify same object is returned.
47 let element = mediaSource.mediaElement;
48 console.log(mediaSource);
hongchan 2017/04/19 15:41:28 Remove all |console.log|s here.
Raymond Toy 2017/04/19 16:34:31 Done.
49 console.log(mediaSource.mediaElement);
50 should(element instanceof HTMLMediaElement,
51 'mediaSource.mediaElement instanceof HTMLMediaElement')
52 .beTrue();
53 should(mediaSource.mediaElement === element,
54 'mediaSource.mediaElement is same object')
55 .beTrue();
56
46 // Try calling connect() with proper values. 57 // Try calling connect() with proper values.
47 should( 58 should(
48 () => audioNode.connect(context.destination, 0, 0), 59 () => audioNode.connect(context.destination, 0, 0),
49 'audioNode.connect(context.destination, 0, 0)') 60 'audioNode.connect(context.destination, 0, 0)')
50 .notThrow(); 61 .notThrow();
51 62
52 // Try creating another MediaElementAudioSourceNode using the same audio 63 // Try creating another MediaElementAudioSourceNode using the same audio
53 // element. 64 // element.
54 should( 65 should(
55 () => context.createMediaElementSource(audioElement), 66 () => context.createMediaElementSource(audioElement),
56 'context.createMediaElementSource(audioElement)') 67 'context.createMediaElementSource(audioElement)')
57 .throw(); 68 .throw();
58 69
59 task.done(); 70 task.done();
60 }); 71 });
61 72
62 audit.run(); 73 audit.run();
63 74
64 </script> 75 </script>
65 76
66 </body> 77 </body>
67 </html> 78 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/MediaStreamAudioSource/mediastreamaudiosourcenode.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698