OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
5 | 5 |
6 <style> | 6 <style> |
7 video { background-color: yellow; width: 320px; height: 240px;} | 7 video { background-color: yellow; width: 320px; height: 240px;} |
8 </style> | 8 </style> |
9 <script src=../media-file.js></script> | 9 <script src=../media-file.js></script> |
| 10 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 11 (Please avoid writing new tests using video-test.js) --> |
10 <script src=../video-test.js></script> | 12 <script src=../video-test.js></script> |
11 <script> | 13 <script> |
12 function setPreferences() | 14 function setPreferences() |
13 { | 15 { |
14 if (!window.internals) { | 16 if (!window.internals) { |
15 consoleWrite("<b>** This test only works in DRT! **<" + "/b>
"); | 17 consoleWrite("<b>** This test only works in DRT! **<" + "/b>
"); |
16 return; | 18 return; |
17 } | 19 } |
18 | 20 |
19 consoleWrite("<i>**Set user preferred languages<" + "/i>"); | 21 consoleWrite("<i>**Set user preferred languages<" + "/i>"); |
20 run("internals.setUserPreferredLanguages(['jp', 'es-ES', 'en', '
fr'])"); | 22 run("internals.setUserPreferredLanguages(['jp', 'es-ES', 'en', '
fr'])"); |
21 window.internals.settings.setTextTrackKindUserPreference('captio
ns'); | 23 window.internals.settings.setTextTrackKindUserPreference('captio
ns'); |
22 } | 24 } |
23 | 25 |
24 function setup() | 26 function setup() |
25 { | 27 { |
26 var video = document.createElement("video"); | 28 var video = document.createElement("video"); |
27 setPreferences(); | 29 setPreferences(); |
28 endTest(); | 30 endTest(); |
29 } | 31 } |
30 | 32 |
31 </script> | 33 </script> |
32 </head> | 34 </head> |
33 <body onload="setup()"> | 35 <body onload="setup()"> |
34 <p>Tests that setting preferences on a track-less video element does not
crash.</p> | 36 <p>Tests that setting preferences on a track-less video element does not
crash.</p> |
35 <video> | 37 <video> |
36 </video> | 38 </video> |
37 </body> | 39 </body> |
38 </html> | 40 </html> |
OLD | NEW |