Chromium Code Reviews| 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..4a4453a8b6af38dc2d9fa047f29f73c603e32e18 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,36 @@ |
| <!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(CFcrash, 10); |
|
mlamouri (slow - plz ping)
2016/05/06 12:58:28
step_func?
Srirama
2016/05/06 14:17:07
Done.
|
| + |
| + function CFcrash() { |
| + document1 = document.implementation.createDocument('', null); |
| + document1.appendChild(label1); |
| + |
| + delete document1; |
| + |
| + setTimeout(runGCAndEndTest, 0); |
|
mlamouri (slow - plz ping)
2016/05/06 12:58:28
step_func_done
Srirama
2016/05/06 14:17:07
Done.
|
| + } |
| + |
| + function runGCAndEndTest() { |
| + gc(); |
| + // No crash. PASS. |
| + t.done(); |
| + } |
| +}); |
| +</script> |