| Index: third_party/WebKit/LayoutTests/media/track/track-removal-crash.html
|
| diff --git a/third_party/WebKit/LayoutTests/media/track/track-removal-crash.html b/third_party/WebKit/LayoutTests/media/track/track-removal-crash.html
|
| index a36d8c6612f5be1d29ac16b9f6d6c68f5ab0a722..f92c2da199462c8bbb36a893eac293969a45813a 100644
|
| --- a/third_party/WebKit/LayoutTests/media/track/track-removal-crash.html
|
| +++ b/third_party/WebKit/LayoutTests/media/track/track-removal-crash.html
|
| @@ -1,56 +1,35 @@
|
| <!DOCTYPE html>
|
| -<html>
|
| - <head>
|
| - <script src=../media-file.js></script>
|
| - <script src=../media-controls.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()
|
| - {
|
| - document.getElementsByTagName('track')[0].track.mode = 'showing';
|
| - document.getElementsByTagName('track')[1].track.mode = 'showing';
|
| -
|
| - setTimeout("CFcrash()", 10);
|
| - }
|
| -
|
| - function CFcrash()
|
| - {
|
| - document1 = document.implementation.createDocument("", null);
|
| - document1.appendChild(label1);
|
| -
|
| - delete document1;
|
| -
|
| - setTimeout(runGCAndEndTest, 0);
|
| - }
|
| -
|
| - function runGCAndEndTest()
|
| - {
|
| - gc();
|
| -
|
| - consoleWrite("");
|
| - consoleWrite("No crash. PASS.");
|
| - consoleWrite("");
|
| -
|
| - endTest();
|
| - }
|
| -
|
| - document.addEventListener("DOMContentLoaded", startTest, false);
|
| - </script>
|
| - </head>
|
| -
|
| - <body>
|
| - <p>Tests that removing track nodes while their parent is being deleted doesn't crash</p>
|
| - <label id="label1">
|
| - <video autoplay>
|
| - <!-- Can't use findMediaElement() as test doesn't crash, so source needs to be specified here -->
|
| - <source src="../content/test.ogv">
|
| - <source src="../content/test.mp4">
|
| - <track src="captions-webvtt/captions-fast.vtt">
|
| - <track src="captions-webvtt/captions-fast.vtt">
|
| - </video>
|
| - </label>
|
| - </body>
|
| -</html>
|
| +<title>Tests that removing track nodes while their parent is being deleted doesn't crash</title>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<label id="label1">
|
| + <video autoplay>
|
| + <!-- Can't use findMediaElement() as test doesn't crash, so source needs to be specified here -->
|
| + <source src="../content/test.ogv">
|
| + <source src="../content/test.mp4">
|
| + <track src="captions-webvtt/captions-fast.vtt">
|
| + <track src="captions-webvtt/captions-fast.vtt">
|
| + </video>
|
| +</label>
|
| +<script>
|
| +async_test(function(t) {
|
| + document.getElementsByTagName('track')[0].track.mode = 'showing';
|
| + document.getElementsByTagName('track')[1].track.mode = 'showing';
|
| +
|
| + setTimeout(t.step_func(CFcrash), 10);
|
| +
|
| + function CFcrash() {
|
| + document1 = document.implementation.createDocument('', null);
|
| + document1.appendChild(label1);
|
| +
|
| + delete document1;
|
| +
|
| + setTimeout(t.step_func_done(runGCAndEndTest), 0);
|
| + }
|
| +
|
| + function runGCAndEndTest() {
|
| + gc();
|
| + // No crash. PASS.
|
| + }
|
| +});
|
| +</script>
|
|
|