| Index: chrome/test/data/extensions/api_test/cast_streaming/rtp_stream_error.js
|
| diff --git a/chrome/test/data/extensions/api_test/cast_streaming/rtp_stream_error.js b/chrome/test/data/extensions/api_test/cast_streaming/rtp_stream_error.js
|
| index 9db19495e35a60d1e95f38e2323bbdfa755fcdd7..b67ddf6a4c85252a511a47b200e6febdcbbf2819 100644
|
| --- a/chrome/test/data/extensions/api_test/cast_streaming/rtp_stream_error.js
|
| +++ b/chrome/test/data/extensions/api_test/cast_streaming/rtp_stream_error.js
|
| @@ -31,19 +31,21 @@ chrome.test.runTests([
|
| pass(function(stream, audioId, videoId, udpId) {
|
| var audioParams = rtpStream.getSupportedParams(audioId)[0];
|
| var videoParams = rtpStream.getSupportedParams(videoId)[0];
|
| - rtpStream.onError.addListener(
|
| - pass(function(audioId, videoId, id, msg) {
|
| - chrome.test.assertEq(videoId, id);
|
| - rtpStream.destroy(audioId);
|
| - rtpStream.destroy(videoId);
|
| - udpTransport.destroy(udpId);
|
| - console.log(msg);
|
| - }.bind(null, audioId, videoId)));
|
| // Specify invalid value to trigger error.
|
| videoParams.payload.codecName = "Animated WebP";
|
| udpTransport.setDestination(udpId,
|
| {address: "127.0.0.1", port: 2344});
|
| - rtpStream.start(videoId, videoParams);
|
| + try {
|
| + rtpStream.start(videoId, videoParams);
|
| + chrome.test.fail();
|
| + } catch (e) {
|
| + rtpStream.stop(audioId);
|
| + rtpStream.stop(videoId);
|
| + rtpStream.destroy(audioId);
|
| + rtpStream.destroy(videoId);
|
| + udpTransport.destroy(udpId);
|
| + chrome.test.succeed();
|
| + }
|
| }.bind(null, stream)));
|
| }));
|
| },
|
|
|