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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-removal-crash.html

Issue 1950283002: Convert track-remove* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/track/track-removal-crash-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <title>Tests that removing track nodes while their parent is being deleted doesn 't crash</title>
3 <head> 3 <script src="../../resources/testharness.js"></script>
4 <script src=../media-file.js></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 <script src=../media-controls.js></script> 5 <label id="label1">
6 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 6 <video autoplay>
7 (Please avoid writing new tests using video-test.js) --> 7 <!-- Can't use findMediaElement() as test doesn't crash, so source needs t o be specified here -->
8 <script src=../video-test.js></script> 8 <source src="../content/test.ogv">
9 <source src="../content/test.mp4">
10 <track src="captions-webvtt/captions-fast.vtt">
11 <track src="captions-webvtt/captions-fast.vtt">
12 </video>
13 </label>
14 <script>
15 async_test(function(t) {
16 document.getElementsByTagName('track')[0].track.mode = 'showing';
17 document.getElementsByTagName('track')[1].track.mode = 'showing';
9 18
10 <script> 19 setTimeout(t.step_func(CFcrash), 10);
11 function startTest()
12 {
13 document.getElementsByTagName('track')[0].track.mode = 'showing';
14 document.getElementsByTagName('track')[1].track.mode = 'showing';
15 20
16 setTimeout("CFcrash()", 10); 21 function CFcrash() {
17 } 22 document1 = document.implementation.createDocument('', null);
23 document1.appendChild(label1);
18 24
19 function CFcrash() 25 delete document1;
20 {
21 document1 = document.implementation.createDocument("", null);
22 document1.appendChild(label1);
23 26
24 delete document1; 27 setTimeout(t.step_func_done(runGCAndEndTest), 0);
28 }
25 29
26 setTimeout(runGCAndEndTest, 0); 30 function runGCAndEndTest() {
27 } 31 gc();
28 32 // No crash. PASS.
29 function runGCAndEndTest() 33 }
30 { 34 });
31 gc(); 35 </script>
32
33 consoleWrite("");
34 consoleWrite("No crash. PASS.");
35 consoleWrite("");
36
37 endTest();
38 }
39
40 document.addEventListener("DOMContentLoaded", startTest, false);
41 </script>
42 </head>
43
44 <body>
45 <p>Tests that removing track nodes while their parent is being deleted d oesn't crash</p>
46 <label id="label1">
47 <video autoplay>
48 <!-- Can't use findMediaElement() as test doesn't crash, so source needs to be specified here -->
49 <source src="../content/test.ogv">
50 <source src="../content/test.mp4">
51 <track src="captions-webvtt/captions-fast.vtt">
52 <track src="captions-webvtt/captions-fast.vtt">
53 </video>
54 </label>
55 </body>
56 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/track/track-removal-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698