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

Side by Side Diff: LayoutTests/fast/events/touch/overlayfullscreenvideo/compositor-touch-hit-rects-fullscreen-video-controls.html

Issue 317373007: Report correct touch hit rects for fullscreen HTML5 video on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add virtual test Created 6 years, 6 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 <body>
2 <p id="discription">
3 This test makes sure that touch hit rects are reported for fullscreen HTML5
4 video control elements when
5 RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() is true.
6 </p>
7 <video id="video" width="300"></video>
8 <script src="../../../../fullscreen/full-screen-test.js"></script>
9 <script>
10 window.onload = function () {
11 document.addEventListener('touchstart', function() { });
12
13 function nameForNode(node) {
14 if (!node)
15 return "[unknown-node]";
16 var name = node.nodeName;
17 if (node.id)
18 name += '#' + node.id;
19 return name;
20 }
21
22 function logRects(fullscreen) {
Rick Byers 2014/06/10 21:39:57 rather than copy/paste code from the touch hit tes
23 var rects = window.internals.touchEventTargetLayerRects(document);
24 for ( var i = 0; i < rects.length; ++i) {
25 var node = rects[i].layerAssociatedNode;
26 var r = rects[i].layerRelativeRect;
27 var nameSuffix = "";
28 if (rects[i].layerType)
29 nameSuffix += " " + rects[i].layerType;
30 var offsetX = rects[i].associatedNodeOffsetX;
31 var offsetY = rects[i].associatedNodeOffsetY;
32 if (offsetX || offsetY)
33 nameSuffix += "[" + offsetX + "," + offsetY + "]"
34 var name = nameForNode(node);
35 logResult((name != '#document') == fullscreen, name + nameSuffix + " ("
36 + r.left + ", " + r.top + ", " + r.width + ", " + r.height + ")" );
37 }
38 }
39
40 consoleWrite("Should have single rect on document before fullscreen");
41 logRects(false);
42
43 waitForEvent(document, 'webkitfullscreenchange', function() {
44 consoleWrite("Should report another rect which is not on the document");
45 logRects(true);
46 endTest();
47 });
48
49 runWithKeyDown(function(){document.querySelector('#video').webkitRequestFull Screen()});
50 }
51 </script>
52 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698