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

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

Issue 987583004: Add audible, muted to Tab, c.t.query, c.t.update, and c.t.onUpdated where relevant (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@patch1
Patch Set: followups through message #36 Created 5 years, 7 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 8f3e1d168ffaf9d2717c2d1ad3448292348cdd90..c9621e84b06b5e8818ef2a4ea5adaea3b5360cd3 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
@@ -29,7 +29,7 @@ chrome.test.runTests([
},
function getCapturedTabs() {
- chrome.tabs.create({active:true}, function(secondTab) {
+ chrome.tabs.create({active: true}, function(secondTab) {
// chrome.tabCapture.capture() will only capture the active tab.
chrome.test.assertTrue(secondTab.active);
@@ -97,6 +97,34 @@ chrome.test.runTests([
});
},
+ function tabIsUnmutedWhenTabCaptured() {
+ var stream1 = null;
+
+ chrome.tabs.getCurrent(function(tab) {
+ chrome.test.listenForever(chrome.tabs.onUpdated,
not at google - send to devlin 2015/06/04 00:00:05 you should also stop listening to this, var stopL
+ function(tabId, changeInfo, updatedTab) {
+ var expectedMutedCause = "capture";
+ var expectedMuted = false;
not at google - send to devlin 2015/06/04 00:00:05 I actually find these harder to read than just if
+
+ if ((changeInfo["mutedCause"] == expectedMutedCause) &&
+ (changeInfo["muted"] === expectedMuted)) {
+ chrome.test.assertEq(expectedMutedCause, updatedTab.mutedCause);
+ chrome.test.assertEq(expectedMuted, updatedTab.muted);
+ stream1.stop();
+ chrome.test.succeed();
+ }
+ });
+
+ chrome.tabs.update(tab.id, {muted: true}, function(newTab) {
+ setTimeout(function() {
+ tabCapture.capture({audio: true}, function(stream) {
+ stream1 = stream;
+ });
+ }, 200);
+ });
not at google - send to devlin 2015/06/04 00:00:05 Ok, I see your point. This is hard to fit into som
+ });
+ },
+
function onlyVideo() {
tabCapture.capture({video: true}, function(stream) {
chrome.test.assertTrue(!!stream);
« no previous file with comments | « chrome/common/extensions/api/tabs.json ('k') | chrome/test/data/extensions/api_test/tabs/basics/audible.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698