| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <title>Tests that the browser handles simple DOM mutations properly.</title> |
| 3 <head> | 3 <script src="../../resources/testharness.js"></script> |
| 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 4 <script src="../../resources/testharnessreport.js"></script> |
| 5 <script> |
| 6 test(function() { |
| 7 var video = document.createElement("video"); |
| 8 var testTrack = document.createElement("track"); |
| 5 | 9 |
| 6 <script src=../media-file.js></script> | 10 // Append the track element to the video element. |
| 7 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 | 11 video.appendChild(testTrack); |
| 8 (Please avoid writing new tests using video-test.js) --> | |
| 9 <script src=../video-test.js></script> | |
| 10 <script> | |
| 11 function startTest() | |
| 12 { | |
| 13 consoleWrite("** Create video and text track element **"); | |
| 14 var video = document.createElement("video"); | |
| 15 var track = document.createElement("track"); | |
| 16 | 12 |
| 17 consoleWrite("** Append the track element to the video element *
*"); | 13 // Set the mode of the text track to "showing". |
| 18 video.appendChild(track); | 14 testTrack.track.mode = "showing"; |
| 19 | 15 }); |
| 20 consoleWrite("** Set the mode of the text track to \"showing\" *
*"); | 16 </script> |
| 21 track.track.mode = "showing"; | |
| 22 | |
| 23 consoleWrite(""); | |
| 24 consoleWrite("No crash. PASS."); | |
| 25 consoleWrite(""); | |
| 26 | |
| 27 endTest(); | |
| 28 } | |
| 29 </script> | |
| 30 </head> | |
| 31 <body onload="startTest()"> | |
| 32 <p>Tests that the browser handles properly simple DOM mutations.</p> | |
| 33 </body> | |
| 34 </html> | |
| OLD | NEW |