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

Side by Side Diff: chrome/test/data/extensions/api_test/tab_capture/api_tests_audio.js

Issue 734853003: Misc clean-up of TabCaptureApiTests; and re-enable more tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
(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 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698