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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/encrypted-media/encrypted-media-many-mediakeys.html
diff --git a/LayoutTests/media/encrypted-media/encrypted-media-many-mediakeys.html b/LayoutTests/media/encrypted-media/encrypted-media-many-mediakeys.html
new file mode 100644
index 0000000000000000000000000000000000000000..42676b9a94e5cdf2016a3e3f4227f2baed1336bb
--- /dev/null
+++ b/LayoutTests/media/encrypted-media/encrypted-media-many-mediakeys.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>ManyMediaKeys</title>
+ <script src=../video-test.js></script>
+ <script>
+ var mediaKeys;
+ var mediaKeys2;
+
+ function runTest()
+ {
+ consoleWrite("Test Many MediaKeys.");
+ findMediaElement();
+ testExpected('video', null, '!=');
+ testExpected('video.mediaKeys', null);
+ testExpected('typeof video.setMediaKeys', 'function');
+
+ consoleWrite("Create a pair of MediaKeys object and run gc.");
+ run('mediaKeys = new MediaKeys("org.w3.clearkey")');
+ run('mediaKeys2 = new MediaKeys("org.w3.clearkey")');
+ run('forceGC()');
+ testExpected('mediaKeys', null, '!=');
+ testExpected('mediaKeys.keySystem', 'org.w3.clearkey');
+ testExpected('mediaKeys2', null, '!=');
+ testExpected('mediaKeys2.keySystem', 'org.w3.clearkey');
+
+ consoleWrite("Drop references to the MediaKeys object and run gc.");
+ run('mediaKeys = null');
+ run('mediaKeys2 = null');
+ run('forceGC()');
+
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
+ consoleWrite("Create 100 MediaKeys objects and run gc.");
+ for(var i=0; i<100; ++i)
+ 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
+ run('forceGC()');
+ testExpected('mediaKeys', null, '!=');
+ testExpected('mediaKeys.keySystem', 'org.w3.clearkey');
+ endTest();
+ }
+ </script>
+ </head>
+ <body onload="runTest()">
+ <p>This tests creating many MediaKeys objects.</p>
+ <video id="video"></video>
+ </body>
+</html>
« 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