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

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

Issue 13464016: Renable tabCapture.ApiTests* now that fix landed in r191910. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable for WinXP Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 var tabCapture = chrome.tabCapture; 5 var tabCapture = chrome.tabCapture;
6 6
7 chrome.test.runTests([ 7 chrome.test.runTests([
8 function captureTabAndVerifyStateTransitions() { 8 function captureTabAndVerifyStateTransitions() {
9 // Tab capture events in the order they happen. 9 // Tab capture events in the order they happen.
10 var tabCaptureEvents = []; 10 var tabCaptureEvents = [];
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 }, 85 },
86 86
87 function onlyVideo() { 87 function onlyVideo() {
88 tabCapture.capture({video: true}, function(stream) { 88 tabCapture.capture({video: true}, function(stream) {
89 chrome.test.assertTrue(!!stream); 89 chrome.test.assertTrue(!!stream);
90 stream.stop(); 90 stream.stop();
91 chrome.test.succeed(); 91 chrome.test.succeed();
92 }); 92 });
93 }, 93 },
94 94
95 function onlyAudio() {
96 tabCapture.capture({audio: true}, function(stream) {
97 chrome.test.assertTrue(!!stream);
98 stream.stop();
99 chrome.test.succeed();
100 });
101 },
102
103 function noAudioOrVideoRequested() { 95 function noAudioOrVideoRequested() {
104 // If not specified, video is not requested. 96 // If not specified, video is not requested.
105 tabCapture.capture({audio: false}, function(stream) { 97 tabCapture.capture({audio: false}, function(stream) {
106 chrome.test.assertTrue(!stream); 98 chrome.test.assertTrue(!stream);
107 chrome.test.succeed(); 99 chrome.test.succeed();
108 }); 100 });
109 },
110
111 function invalidAudioConstraints() {
112 var tabCaptureListener = function(info) {
113 if (info.status == 'stopped') {
114 tabCapture.onStatusChanged.removeListener(tabCaptureListener);
115
116 tabCapture.capture({audio: true, video: true}, function(stream) {
117 chrome.test.assertTrue(!!stream);
118 chrome.test.succeed();
119 });
120 }
121 };
122 tabCapture.onStatusChanged.addListener(tabCaptureListener);
123
124 tabCapture.capture({audio: true,
125 audioConstraints: {
126 'mandatory': {
127 'notValid': '123'
128 }
129 }}, function(stream) {
130 chrome.test.assertTrue(!stream);
131 });
132 } 101 }
133 102
134 ]); 103 ]);
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698