Commit e9289caa authored by Weiyong Yao's avatar Weiyong Yao Committed by Commit Bot

Remove 'tabIsUnmutedWhenTabCaptured()' case from tab capture api tests.

The test case 'tabIsUnmutedWhenTabCaptured()' has several issues itself
and is not valid any more in nowadays.
This cl is to remove this test case.

Bug: 882397
Change-Id: I9cc7826ae26cf0d57f66426cce26bcfeb16941a0
Reviewed-on: https://chromium-review.googlesource.com/1219902
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: default avatarYuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590560}
parent b308a464
......@@ -158,13 +158,7 @@ TEST(TabCaptureCaptureOffscreenTabTest, DetermineInitialSize) {
// Tests API behaviors, including info queries, and constraints violations.
IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_ApiTests) {
AddExtensionToCommandLineWhitelist();
ASSERT_TRUE(RunExtensionSubtest(
"tab_capture", base::StringPrintf("api_tests.html%s",
base::FeatureList::IsEnabled(
features::kAudioServiceAudioStreams)
? ""
: "?includeLegacyUnmuteTest=true")))
<< message_;
ASSERT_TRUE(RunExtensionSubtest("tab_capture", "api_tests.html")) << message_;
}
#if defined(OS_MACOSX) && defined(ADDRESS_SANITIZER)
......
......@@ -174,28 +174,4 @@ var testsToRun = [
}
];
if (window.location.search.indexOf("includeLegacyUnmuteTest=true") != -1) {
testsToRun.push(function tabIsUnmutedWhenTabCaptured() {
var stream1 = null;
chrome.tabs.getCurrent(function(tab) {
var stopListener = chrome.test.listenForever(chrome.tabs.onUpdated,
function(tabId, changeInfo, updatedTab) {
if ((changeInfo.mutedInfo.muted === true)) {
tabCapture.capture({audio: true}, function(stream) {
stream1 = stream;
});
}
else if ((changeInfo.mutedInfo.reason == "capture") &&
(changeInfo.mutedInfo.muted === false)) {
stream1.getAudioTracks()[0].stop();
stopListener();
}
});
chrome.tabs.update(tab.id, {muted: true});
});
});
}
chrome.test.runTests(testsToRun);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment