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

Unified Diff: media/test/data/eme_player_js/utils.js

Issue 854633003: Verify heartbeat messages have type 'license-renewal' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: renewal Created 5 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
Index: media/test/data/eme_player_js/utils.js
diff --git a/media/test/data/eme_player_js/utils.js b/media/test/data/eme_player_js/utils.js
index 3619d4e5426f5ceaab5b03686ea42e839e3b42b2..c4e250c49b0586abadf7ea119823450f53b81003 100644
--- a/media/test/data/eme_player_js/utils.js
+++ b/media/test/data/eme_player_js/utils.js
@@ -202,6 +202,17 @@ Utils.installTitleEventHandler = function(element, event) {
}, false);
};
+Utils.isRenewalMessage = function(message) {
+ if (message.messageType != 'license-renewal')
+ return false;
+
+ if (!Utils.isHeartBeatMessage(message.message)) {
+ Utils.failTest('license-renewal message doesn\'t contain HEART_BEAT_HEADER',
+ KEY_ERROR);
+ }
+ return true;
+};
+
Utils.isHeartBeatMessage = function(msg) {
return Utils.hasPrefix(Utils.convertToUint8Array(msg), HEART_BEAT_HEADER);
};

Powered by Google App Engine
This is Rietveld 408576698