Index: LayoutTests/media/track/track-language-preference-no-crash.html |
diff --git a/LayoutTests/media/track/track-language-preference-no-crash.html b/LayoutTests/media/track/track-language-preference-no-crash.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2eb2e8683aee61872ecac1ba7e96b7ea2c44d6de |
--- /dev/null |
+++ b/LayoutTests/media/track/track-language-preference-no-crash.html |
@@ -0,0 +1,38 @@ |
+<!DOCTYPE html> |
+<html> |
+ <head> |
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
+ |
+ <style> |
+ video { background-color: yellow; width: 320px; height: 240px;} |
+ </style> |
+ <script src=../media-file.js></script> |
+ <script src=../video-test.js></script> |
+ <script> |
+ function setPreferences() |
+ { |
+ if (!window.internals) { |
+ consoleWrite("<b>** This test only works in DRT! **<" + "/b>"); |
+ return; |
+ } |
+ |
+ consoleWrite("<i>**Set user preferred languages<" + "/i>"); |
+ run("internals.setUserPreferredLanguages(['jp', 'es-ES', 'en', 'fr'])"); |
+ window.internals.settings.setTextTrackKindUserPreference('captions'); |
+ } |
+ |
+ function setup() |
+ { |
+ var video = document.createElement("video"); |
+ setPreferences(); |
+ endTest(); |
+ } |
+ |
+ </script> |
+ </head> |
+ <body onload="setup()"> |
+ <p>Tests that setting preferences on a track-less video element does not crash.</p> |
+ <video> |
+ </video> |
+ </body> |
+</html> |