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> |