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