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

Unified Diff: third_party/WebKit/LayoutTests/media/video-no-controls-events-not-absorbed.html

Issue 2643723003: Media Controls: do not handle any event if no controls should be visible. (Closed)
Patch Set: Created 3 years, 11 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/Source/core/html/shadow/MediaControls.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/video-no-controls-events-not-absorbed.html
diff --git a/third_party/WebKit/LayoutTests/media/video-no-controls-events-not-absorbed.html b/third_party/WebKit/LayoutTests/media/video-no-controls-events-not-absorbed.html
new file mode 100644
index 0000000000000000000000000000000000000000..13bdfc8dbd17f8068fb9876fb9eee118c20f939e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/video-no-controls-events-not-absorbed.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<title>Video elements without controls should not absborb click events</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="media-file.js"></script>
+<video></video>
+<script>
+test(_ => {
whywhat 2017/01/18 19:37:17 nit: blank line before?
+ assert_true('eventSender' in window);
+}, 'eventSender required');
+
+async_test(t => {
+ var video = document.querySelector('video');
+ video.addEventListener('loadedmetadata', t.step_func(_ => {
whywhat 2017/01/18 19:37:17 won't this fail on low-end devices?
mlamouri (slow - plz ping) 2017/01/19 10:51:00 I think most of the media/ tests wouldn't work on
+ var rect = video.getBoundingClientRect();
+ eventSender.gestureTap(rect.left + rect.width / 2,
+ rect.top + rect.height / 2);
+ }));
+
+ addEventListener('click', t.step_func(_ => {
+ assert_true(true, 'Received click');
+ t.done();
+ }));
+
+ video.src = findMediaFile('video', 'content/test');
+});
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/MediaControls.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698