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

Unified Diff: third_party/WebKit/LayoutTests/media/controls/volumechange-stopimmediatepropagation.html

Issue 2477203002: Media Controls: delegate 'volumechange' and 'focusin' handling to an EventListener. (Closed)
Patch Set: add comment Created 4 years, 1 month 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
Index: third_party/WebKit/LayoutTests/media/controls/volumechange-stopimmediatepropagation.html
diff --git a/third_party/WebKit/LayoutTests/media/controls/volumechange-stopimmediatepropagation.html b/third_party/WebKit/LayoutTests/media/controls/volumechange-stopimmediatepropagation.html
new file mode 100644
index 0000000000000000000000000000000000000000..3a448661b4e9ada7ee600106c4782ed57992683b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/controls/volumechange-stopimmediatepropagation.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+<title>This tests that controls are properly updated when stopImmediatePropagation is used in event handler.</title>
+<script src="../media-file.js"></script>
+<div>
+ <audio></audio>
+</div>
+<div>
+ <video></video>
+</div>
+<div id='a'>
+</div>
+<div id='v'>
+</div>
+<script>
+ // Elements created from script.
+ var audio = document.createElement('audio');
+ audio.onvolumechange = e => { e.stopImmediatePropagation() };
+ document.querySelector('#a').appendChild(audio);
+ audio.src = findMediaFile('audio', '../content/test');
+ audio.controls = true;
+ audio.onloadedmetadata = () => { audio.muted = true; }
+
+ var video = document.createElement('video');
+ video.onvolumechange = e => { e.stopImmediatePropagation() };
+ document.querySelector('#v').appendChild(video);
+ video.src = findMediaFile('video', '../content/test');
+ video.controls = true;
+ video.onloadedmetadata = () => { video.muted = true; }
+
+ // Elements created during parsing.
+ var audio = document.querySelector('audio');
+ audio.onvolumechange = e => { e.stopImmediatePropagation() };
+ audio.src = findMediaFile('audio', '../content/test');
+ audio.controls = true;
+ audio.muted = true;
+
+ var video = document.querySelector('video');
+ video.onvolumechange = e => { e.stopImmediatePropagation() };
+ video.src = findMediaFile('video', '../content/test');
+ video.controls = true;
+ video.muted = true;
+</script>
+</html>

Powered by Google App Engine
This is Rietveld 408576698