| Index: extensions/test/data/api_test/audio/test.js
|
| diff --git a/extensions/test/data/api_test/audio/test.js b/extensions/test/data/api_test/audio/test.js
|
| index f79afa85b7cc6f14829ea09c20103d42b7eef670..14460e68c0220f0b0c0e1f62433002538ce76a18 100644
|
| --- a/extensions/test/data/api_test/audio/test.js
|
| +++ b/extensions/test/data/api_test/audio/test.js
|
| @@ -161,11 +161,9 @@ chrome.test.runTests([
|
| var updatedOutput = expectedOutput['30001'];
|
| chrome.test.assertFalse(updatedOutput.isMuted);
|
| chrome.test.assertFalse(updatedOutput.volume === 35);
|
| - updatedOutput.isMuted = true;
|
| updatedOutput.volume = 35;
|
|
|
| chrome.audio.setProperties('30001', {
|
| - isMuted: true,
|
| volume: 35
|
| }, chrome.test.callbackPass(function() {
|
| chrome.audio.setProperties('40002', {
|
| @@ -182,22 +180,51 @@ chrome.test.runTests([
|
| });
|
| },
|
|
|
| + function inputMuteTest() {
|
| + var getMute = function(callback) {
|
| + chrome.audio.getMute('INPUT', chrome.test.callbackPass(callback));
|
| + };
|
| + getMute(function(originalValue) {
|
| + chrome.audio.setMute('INPUT', !originalValue,
|
| + chrome.test.callbackPass(function() {
|
| + getMute(function(value) {
|
| + chrome.test.assertEq(!originalValue, value);
|
| + });
|
| + }));
|
| + });
|
| + },
|
| +
|
| + function outputMuteTest() {
|
| + var getMute = function(callback) {
|
| + chrome.audio.getMute('OUTPUT', chrome.test.callbackPass(callback));
|
| + };
|
| + getMute(function(originalValue) {
|
| + chrome.audio.setMute('OUTPUT', !originalValue,
|
| + chrome.test.callbackPass(function() {
|
| + getMute(function(value) {
|
| + chrome.test.assertEq(!originalValue, value);
|
| + });
|
| + }));
|
| + });
|
| + },
|
| +
|
| function setPropertiesInvalidValuesTest() {
|
| chrome.audio.getInfo(function(originalOutputInfo, originalInputInfo) {
|
| chrome.test.assertNoLastError();
|
| var expectedInput = deviceListToExpectedDevicesMap(originalInputInfo);
|
| var expectedOutput = deviceListToExpectedDevicesMap(originalOutputInfo);
|
| + var expectedError = 'Could not set volume/gain properties';
|
|
|
| chrome.audio.setProperties('30001', {
|
| isMuted: true,
|
| // Output device - should have volume set.
|
| gain: 55
|
| - }, chrome.test.callbackFail('Could not set properties', function() {
|
| + }, chrome.test.callbackFail(expectedError, function() {
|
| chrome.audio.setProperties('40002', {
|
| isMuted: true,
|
| // Input device - should have gain set.
|
| volume:55
|
| - }, chrome.test.callbackFail('Could not set properties', function() {
|
| + }, chrome.test.callbackFail(expectedError, function() {
|
| // Assert that device properties haven't changed.
|
| chrome.audio.getInfo(
|
| chrome.test.callbackPass(function(outputInfo, inputInfo) {
|
|
|