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

Unified Diff: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-utils.js

Issue 2618603002: [eme] Convert lifetime tests to promise_tests (Closed)
Patch Set: move to utils Created 3 years, 11 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 | « third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-lifetime-multiple-mediakeys.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-utils.js
diff --git a/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-utils.js b/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-utils.js
index 3c8cbf9982007769f595a5067d26d3f6f4cb0621..7da412966c110ad85e2eddf65b67ef795f8e3a90 100644
--- a/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-utils.js
+++ b/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-utils.js
@@ -329,3 +329,16 @@ function playVideoAndWaitForTimeupdate(video, content, duration)
});
});
}
+
+// Verifies that the number of existing MediaKey and MediaKeySession objects
+// match what is expected.
+function verifyMediaKeyAndMediaKeySessionCount(
+ expectedMediaKeysCount, expectedMediaKeySessionCount, description)
+{
+ assert_equals(window.internals.mediaKeysCount(),
+ expectedMediaKeysCount,
+ description + ', MediaKeys:');
+ assert_equals(window.internals.mediaKeySessionCount(),
+ expectedMediaKeySessionCount,
+ description + ', MediaKeySession:');
+}
« no previous file with comments | « third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-lifetime-multiple-mediakeys.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698