| 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..5c61bfae1edfcac53d1a1efeccf9b0ad15064fe7 100644
|
| --- a/chrome/test/data/extensions/api_test/cast_streaming/common.js
|
| +++ b/chrome/test/data/extensions/api_test/cast_streaming/common.js
|
| @@ -13,6 +13,8 @@ function TestStateMachine(stream, audioId, videoId, udpId) {
|
| this.videoStopped = false;
|
| this.gotAudioRawEvents = false;
|
| this.gotVideoRawEvents = false;
|
| + this.gotAudioStats = false;
|
| + this.gotVideoStats = false;
|
| }
|
|
|
| TestStateMachine.prototype.onStarted = function(id) {
|
| @@ -33,15 +35,23 @@ TestStateMachine.prototype.onStopped = function(id) {
|
| this.onAllStopped();
|
| }
|
|
|
| -TestStateMachine.prototype.onGotRawEvents = function(id, rawEvents) {
|
| - chrome.test.assertTrue(rawEvents.length > 0);
|
| +TestStateMachine.prototype.onGotLogs = function(id, isStats, data) {
|
| + chrome.test.assertTrue(data.length > 0);
|
| if (id == this.audioId) {
|
| - this.gotAudioRawEvents = true;
|
| + if (isStats)
|
| + this.gotAudioStats = true;
|
| + else
|
| + this.gotAudioRawEvents = true;
|
| }
|
| if (id == this.videoId) {
|
| - this.gotVideoRawEvents = true;
|
| + if (isStats)
|
| + this.gotVideoStats = true;
|
| + else
|
| + this.gotVideoRawEvents = true;
|
| + }
|
| + if (this.gotAudioRawEvents && this.gotVideoRawEvents &&
|
| + this.gotAudioStats && this.gotVideoStats) {
|
| + this.onGotAllLogs();
|
| }
|
| - if (this.gotAudioRawEvents && this.gotVideoRawEvents)
|
| - this.onGotAllRawEvents();
|
| }
|
|
|
|
|