Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: LayoutTests/media/track/track-language-preference-no-crash.html

Issue 1224083013: Gracefully handle track-less elements on updating track selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/media/track/track-language-preference-no-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/media/track/track-language-preference-no-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698