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

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

Issue 1938533002: Convert track-language* and track-large* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 7 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
Index: third_party/WebKit/LayoutTests/media/track/track-language-preference-no-crash.html
diff --git a/third_party/WebKit/LayoutTests/media/track/track-language-preference-no-crash.html b/third_party/WebKit/LayoutTests/media/track/track-language-preference-no-crash.html
index 709f480bd8ffa02ea4901b7666acc6a482d4246d..3c7a0d069281478b7552e52a277c8508ff60b505 100644
--- a/third_party/WebKit/LayoutTests/media/track/track-language-preference-no-crash.html
+++ b/third_party/WebKit/LayoutTests/media/track/track-language-preference-no-crash.html
@@ -1,40 +1,13 @@
<!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>
- <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
- (Please avoid writing new tests using video-test.js) -->
- <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>
+<title>Tests that setting preferences on a track-less video element does not crash.</title>
+<script src="../media-file.js"></script>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+test(function() {
+ var video = document.createElement('video');
+ // Set user preferred languages.
+ internals.setUserPreferredLanguages(['jp', 'es-ES', 'en', 'fr']);
+ internals.settings.setTextTrackKindUserPreference('captions');
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698