OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>media controls cast button</title> | 4 <title>media controls cast button</title> |
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="media-file.js"></script> | 7 <script src="media-file.js"></script> |
8 <script src="media-controls.js"></script> | 8 <script src="media-controls.js"></script> |
9 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 | 9 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 |
10 (Please avoid writing new tests using video-test.js) --> | 10 (Please avoid writing new tests using video-test.js) --> |
11 <script src="video-test.js"></script> | 11 <script src="video-test.js"></script> |
12 </head> | 12 </head> |
13 <body> | 13 <body> |
14 <video width="100" height="200" controls></video> | 14 <video width="100" height="200" controls></video> |
15 <script> | 15 <script> |
16 function castButton(element) | 16 function castButton(element) |
17 { | 17 { |
18 var controlID = "-internal-media-controls-cast-button"; | 18 var controlID = "-internal-media-controls-cast-button"; |
19 var button = mediaControlsElement(window.internals.shadowRoot(elemen
t).firstChild, controlID); | 19 var button = mediaControlsElement(window.internals.shadowRoot(elemen
t).firstChild, controlID); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 assert_greater_than_equal(rect.left, videoRect.left, "button sho
uld be at top left of video"); | 64 assert_greater_than_equal(rect.left, videoRect.left, "button sho
uld be at top left of video"); |
65 assert_less_than_equal(rect.bottom, videoRect.top + videoRect.he
ight / 2, "button should be at top left of video"); | 65 assert_less_than_equal(rect.bottom, videoRect.top + videoRect.he
ight / 2, "button should be at top left of video"); |
66 assert_less_than_equal(rect.right, videoRect.left + videoRect.wi
dth / 2, "button should be at top left of video"); | 66 assert_less_than_equal(rect.right, videoRect.left + videoRect.wi
dth / 2, "button should be at top left of video"); |
67 | 67 |
68 t.done(); | 68 t.done(); |
69 }) | 69 }) |
70 }); | 70 }); |
71 </script> | 71 </script> |
72 </body> | 72 </body> |
73 </html> | 73 </html> |
OLD | NEW |