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

Side by Side Diff: LayoutTests/media/track/media-element-enqueue-event-crash.html

Issue 15739014: Avoid referencing an HTMLMediaElement if is currently being deleted (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed build error again Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/media/track/media-element-enqueue-event-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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src=../media-file.js></script>
5 <script src=../media-controls.js></script>
6 <script src=../video-test.js></script>
7
8 <script>
9 if (window.testRunner)
10 {
11 testRunner.dumpAsText();
12 testRunner.waitUntilDone();
13 }
14
15 function startTest()
16 {
17 if (localStorage.testRuns)
18 localStorage.testRuns = Number(localStorage.testRuns) + 1;
19 else {
20 localStorage.testRuns = 1;
21 localStorage.totalRuns = 5;
22 }
23
24 document.getElementsByTagName('track')[0].track.mode = 'showing';
25 setTimeout(CFcrash, 100);
26 }
27
28 function forceGC() {
29 gc();
30
31 // End the test only if it ran at least totalRuns.
32 if (window.testRunner && localStorage.testRuns == localStorage.total Runs) {
33 consoleWrite("** No crash. Pass **");
34 testRunner.notifyDone();
35 } else
36 window.location.reload();
37 }
38
39 function CFcrash()
40 {
41 document1 = document.implementation.createDocument("", null);
42 document1.appendChild(videoElement);
43 delete document1;
44
45 setTimeout(forceGC, 0);
46 }
47
48 document.addEventListener("DOMContentLoaded", startTest, false);
49 </script>
50 </head>
51
52 <body>
53 <p>Tests that appending events for dispatching doesn't crash</p>
54 <video autoplay id="videoElement">
55 <source src="../content/test.ogv">
56 <source src="../content/test.mp4">
57 <track src="captions-webvtt/captions-fast.vtt" default>
58 </video>
59 </body>
60 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/media/track/media-element-enqueue-event-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698