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

Unified Diff: chrome/test/data/extensions/api_test/cast_streaming/common.js

Issue 184853003: Cast: Add GetStats() extensions API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: static cast to int Created 6 years, 9 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: chrome/test/data/extensions/api_test/cast_streaming/common.js
diff --git a/chrome/test/data/extensions/api_test/cast_streaming/common.js b/chrome/test/data/extensions/api_test/cast_streaming/common.js
index 36b6aec8287b2bb4ca13248486bc3366400b0bea..2862b17f6317042ad108f7274e79bc61558c770a 100644
--- a/chrome/test/data/extensions/api_test/cast_streaming/common.js
+++ b/chrome/test/data/extensions/api_test/cast_streaming/common.js
@@ -11,8 +11,8 @@ function TestStateMachine(stream, audioId, videoId, udpId) {
this.videoStarted = false;
this.audioStopped = false;
this.videoStopped = false;
- this.gotAudioRawEvents = false;
- this.gotVideoRawEvents = false;
+ this.gotAudioLogs = false;
+ this.gotVideoLogs = false;
}
TestStateMachine.prototype.onStarted = function(id) {
@@ -33,15 +33,13 @@ TestStateMachine.prototype.onStopped = function(id) {
this.onAllStopped();
}
-TestStateMachine.prototype.onGotRawEvents = function(id, rawEvents) {
- chrome.test.assertTrue(rawEvents.length > 0);
- if (id == this.audioId) {
- this.gotAudioRawEvents = true;
- }
- if (id == this.videoId) {
- this.gotVideoRawEvents = true;
- }
- if (this.gotAudioRawEvents && this.gotVideoRawEvents)
- this.onGotAllRawEvents();
+TestStateMachine.prototype.onGotLogs = function(id, data) {
+ chrome.test.assertTrue(!!data);
+ if (id == this.audioId)
+ this.gotAudioLogs = true;
+ if (id == this.videoId)
+ this.gotVideoLogs = true;
+ if (this.gotAudioLogs && this.gotVideoLogs)
+ this.onGotAllLogs();
}

Powered by Google App Engine
This is Rietveld 408576698