Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / media / video-controls-zoomed.html
blobc0dfbe49af692561773bbcd30022984bc6713d97
1 <html>
2 <head>
3 <title>Test controls with zooming</title>
4 <style type="text/css" media="screen">
5 video {
6 margin: 50px;
8 </style>
9 <script src=media-file.js></script>
10 <script src=media-controls.js></script>
11 <script type="text/javascript" charset="utf-8">
12 function runTest()
14 window.setTimeout(function() {
15 document.documentElement.style.zoom = '150%';
16 video.addEventListener("playing", function() {
17 testExpected("video.paused", false);
18 endTest();
19 });
21 if (window.eventSender)
23 // Find the play button and click the middle of its bounding box.
24 var playCoords;
25 try {
26 playCoords = mediaControlsButtonCoordinates(video, "play-button");
27 } catch (exception) {
28 failTest(exception.description);
29 return;
31 var clickX = playCoords[0];
32 var clickY = playCoords[1];
34 // Apply the page zoom value to the coordinates because
35 // getBoundingClientRect() used in
36 // mediaControlsButtonCoordinates() doesn't do it.
37 clickX = clickX * 1.5;
38 clickY = clickY * 1.5;
40 eventSender.mouseMoveTo(clickX, clickY);
41 eventSender.mouseDown();
42 eventSender.mouseUp();
44 }, 50);
46 </script>
47 </head>
48 <body>
49 <video controls></video>
50 <p>Test controls on zoomed video.</p>
51 <p>This test only runs in DRT!</p>
52 <script src=video-test.js></script>
53 <script>
54 testExpected("video.controls", null, '!=');
55 waitForEvent('canplaythrough', function() {
56 runTest();
57 } );
58 video.src = findMediaFile("video", "content/test");
59 </script>
60 </body>
61 </html>