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

Unified Diff: chrome/test/data/extensions/api_test/tab_capture/api_tests.js

Issue 1344753002: Update tests for chrome, as MediaStream label, ended attributes and stop() method will be removed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/tab_capture/api_tests.js
diff --git a/chrome/test/data/extensions/api_test/tab_capture/api_tests.js b/chrome/test/data/extensions/api_test/tab_capture/api_tests.js
index d7c6f7b54e61d6f2fd4b2a1f15a7aeff707ede1f..1efad1de61f8b4b295784fc716fc78dd0ef11a35 100644
--- a/chrome/test/data/extensions/api_test/tab_capture/api_tests.js
+++ b/chrome/test/data/extensions/api_test/tab_capture/api_tests.js
@@ -24,7 +24,8 @@ chrome.test.runTests([
tabCapture.capture({audio: true, video: true}, function(stream) {
chrome.test.assertTrue(!!stream);
- stream.stop();
+ stream.getVideoTracks()[0].stop();
+ stream.getAudioTracks()[0].stop();
});
},
@@ -66,7 +67,8 @@ chrome.test.runTests([
// returns 'active' capturing status for the second tab.
var capturedTabsAfterStartCapture = function(infos) {
checkInfoForSecondTabHasStatus(infos, 'active');
- activeStream.stop();
+ activeStream.getVideoTracks()[0].stop();
+ activeStream.getAudioTracks()[0].stop();
tabCapture.getCapturedTabs(capturedTabsAfterStopCapture);
};
@@ -86,7 +88,8 @@ chrome.test.runTests([
chrome.test.assertLastError(
'Cannot capture a tab with an active stream.');
chrome.test.assertTrue(!stream);
- stream1.stop();
+ stream1.getVideoTracks()[0].stop();
+ stream1.getAudioTracks()[0].stop();
chrome.test.succeed();
};
@@ -110,7 +113,7 @@ chrome.test.runTests([
}
else if ((changeInfo.mutedInfo.reason == "capture") &&
(changeInfo.mutedInfo.muted === false)) {
- stream1.stop();
+ stream1.getAudioTracks()[0].stop();
stopListener();
}
});
@@ -122,7 +125,7 @@ chrome.test.runTests([
function onlyVideo() {
tabCapture.capture({video: true}, function(stream) {
chrome.test.assertTrue(!!stream);
- stream.stop();
+ stream.getVideoTracks()[0].stop();
chrome.test.succeed();
});
},
@@ -130,7 +133,7 @@ chrome.test.runTests([
function onlyAudio() {
tabCapture.capture({audio: true}, function(stream) {
chrome.test.assertTrue(!!stream);
- stream.stop();
+ stream.getAudioTracks()[0].stop();
chrome.test.succeed();
});
},

Powered by Google App Engine
This is Rietveld 408576698