Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 var tabCapture = chrome.tabCapture; | |
| 6 | |
| 7 chrome.test.runTests([ | |
| 8 | |
| 9 function onlyAudio() { | |
|
miu
2014/11/19 01:15:54
This moved into api_tests.js.
| |
| 10 tabCapture.capture({audio: true}, function(stream) { | |
| 11 chrome.test.assertTrue(!!stream); | |
| 12 stream.stop(); | |
| 13 chrome.test.succeed(); | |
| 14 }); | |
| 15 }, | |
| 16 | |
| 17 function invalidAudioConstraints() { | |
|
miu
2014/11/19 01:15:54
This moved into constraints.js.
| |
| 18 var tabCaptureListener = function(info) { | |
| 19 if (info.status == 'stopped') { | |
| 20 tabCapture.onStatusChanged.removeListener(tabCaptureListener); | |
| 21 | |
| 22 tabCapture.capture({audio: true, video: true}, function(stream) { | |
| 23 chrome.test.assertTrue(!!stream); | |
| 24 chrome.test.succeed(); | |
| 25 }); | |
| 26 } | |
| 27 }; | |
| 28 tabCapture.onStatusChanged.addListener(tabCaptureListener); | |
| 29 | |
| 30 tabCapture.capture({audio: true, | |
| 31 audioConstraints: { | |
| 32 'mandatory': { | |
| 33 'notValid': '123' | |
| 34 } | |
| 35 }}, function(stream) { | |
| 36 chrome.test.assertTrue(!stream); | |
| 37 }); | |
| 38 } | |
| 39 | |
| 40 ]); | |
| OLD | NEW |