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.
6 function supportsMediaConstraints() {
7 chrome.tabCapture.capture({
17 chrome.test.assertTrue(!!stream);
18 stream.getVideoTracks()[0].stop();
19 stream.getAudioTracks()[0].stop();
20 chrome.test.succeed();
24 function rejectsOptionalMediaConstraints() {
25 chrome.tabCapture.capture({
37 chrome.test.assertTrue(!stream);
38 chrome.test.succeed();
42 function rejectsInvalidConstraints() {
43 chrome.tabCapture.capture({
52 chrome.test.assertTrue(!stream);
54 chrome.tabCapture.capture({
62 chrome.test.assertTrue(!stream);
63 chrome.test.succeed();