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

Side by Side Diff: LayoutTests/media/encrypted-media/encrypted-media-many-mediakeys.html

Issue 180203002: Add EME content test that forces garbage collection (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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 | LayoutTests/media/encrypted-media/encrypted-media-many-mediakeys-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 <title>ManyMediaKeys</title>
5 <script src=../video-test.js></script>
6 <script>
7 var mediaKeys;
8 var mediaKeys2;
9
10 function runTest()
11 {
12 consoleWrite("Test Many MediaKeys.");
13 findMediaElement();
14 testExpected('video', null, '!=');
15 testExpected('video.mediaKeys', null);
16 testExpected('typeof video.setMediaKeys', 'function');
17
18 consoleWrite("Create a pair of MediaKeys object and run gc.");
19 run('mediaKeys = new MediaKeys("org.w3.clearkey")');
20 run('mediaKeys2 = new MediaKeys("org.w3.clearkey")');
21 run('forceGC()');
22 testExpected('mediaKeys', null, '!=');
23 testExpected('mediaKeys.keySystem', 'org.w3.clearkey');
24 testExpected('mediaKeys2', null, '!=');
25 testExpected('mediaKeys2.keySystem', 'org.w3.clearkey');
26
27 consoleWrite("Drop references to the MediaKeys object and run gc .");
28 run('mediaKeys = null');
29 run('mediaKeys2 = null');
30 run('forceGC()');
31
xhwang 2014/02/25 19:02:03 What do we expect here? Can we testExpected('med
xhwang 2014/02/25 19:03:12 hmm, sorry. I meant how can we make sure mediaKeys
jrummell 2014/02/25 19:55:08 I don't know of anyway to verify that gc actually
32 consoleWrite("Create 100 MediaKeys objects and run gc.");
33 for(var i=0; i<100; ++i)
34 run('mediaKeys = new MediaKeys("org.w3.clearkey")');
xhwang 2014/02/25 19:02:03 What's the purpose of creating 100 MediaKeys here?
jrummell 2014/02/25 19:55:08 Simply creating a "large" number of objects. 100 i
35 run('forceGC()');
36 testExpected('mediaKeys', null, '!=');
37 testExpected('mediaKeys.keySystem', 'org.w3.clearkey');
38 endTest();
39 }
40 </script>
41 </head>
42 <body onload="runTest()">
43 <p>This tests creating many MediaKeys objects.</p>
44 <video id="video"></video>
45 </body>
46 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/media/encrypted-media/encrypted-media-many-mediakeys-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698