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

Unified Diff: third_party/WebKit/LayoutTests/media/track/track-element-dom-change-crash.html

Issue 1927223002: Convert track tests from video-test.js to testharness.js based (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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-element-dom-change-crash.html
diff --git a/third_party/WebKit/LayoutTests/media/track/track-element-dom-change-crash.html b/third_party/WebKit/LayoutTests/media/track/track-element-dom-change-crash.html
index 8c6549d5ff9f2f72fe273d921bd14934c57515ad..277525ec3fcec4304a63bd1dbb798dadb9dc6e67 100644
--- a/third_party/WebKit/LayoutTests/media/track/track-element-dom-change-crash.html
+++ b/third_party/WebKit/LayoutTests/media/track/track-element-dom-change-crash.html
@@ -1,34 +1,16 @@
<!DOCTYPE html>
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Tests that the browser handles simple DOM mutations properly.</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+test(function() {
+ var video = document.createElement("video");
+ var testTrack = document.createElement("track");
- <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 startTest()
- {
- consoleWrite("** Create video and text track element **");
- var video = document.createElement("video");
- var track = document.createElement("track");
+ // Append the track element to the video element.
+ video.appendChild(testTrack);
- consoleWrite("** Append the track element to the video element **");
- video.appendChild(track);
-
- consoleWrite("** Set the mode of the text track to \"showing\" **");
- track.track.mode = "showing";
-
- consoleWrite("");
- consoleWrite("No crash. PASS.");
- consoleWrite("");
-
- endTest();
- }
- </script>
- </head>
- <body onload="startTest()">
- <p>Tests that the browser handles properly simple DOM mutations.</p>
- </body>
-</html>
+ // Set the mode of the text track to "showing".
+ testTrack.track.mode = "showing";
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698