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

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

Issue 1344753002: Update tests for chrome, as MediaStream label, ended attributes and stop() method will be removed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 chrome.test.runTests([ 5 chrome.test.runTests([
6 function supportsMediaConstraints() { 6 function supportsMediaConstraints() {
7 chrome.tabCapture.capture({ 7 chrome.tabCapture.capture({
8 video: true, 8 video: true,
9 audio: true, 9 audio: true,
10 videoConstraints: { 10 videoConstraints: {
11 mandatory: { 11 mandatory: {
12 maxWidth: 1000, 12 maxWidth: 1000,
13 minWidth: 300 13 minWidth: 300
14 } 14 }
15 } 15 }
16 }, function(stream) { 16 }, function(stream) {
17 chrome.test.assertTrue(!!stream); 17 chrome.test.assertTrue(!!stream);
18 stream.stop(); 18 stream.getVideoTracks()[0].stop();
19 stream.getAudioTracks()[0].stop();
19 chrome.test.succeed(); 20 chrome.test.succeed();
20 }); 21 });
21 }, 22 },
22 23
23 function rejectsOptionalMediaConstraints() { 24 function rejectsOptionalMediaConstraints() {
24 chrome.tabCapture.capture({ 25 chrome.tabCapture.capture({
25 video: true, 26 video: true,
26 audio: true, 27 audio: true,
27 videoConstraints: { 28 videoConstraints: {
28 mandatory: { 29 mandatory: {
(...skipping 28 matching lines...) Expand all
57 notValid: '123' 58 notValid: '123'
58 } 59 }
59 } 60 }
60 }, function(stream) { 61 }, function(stream) {
61 chrome.test.assertTrue(!stream); 62 chrome.test.assertTrue(!stream);
62 chrome.test.succeed(); 63 chrome.test.succeed();
63 }); 64 });
64 }); 65 });
65 } 66 }
66 ]); 67 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698