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

Side by Side Diff: chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc

Issue 2721113002: getUserMedia: handle the device starting status report. (Closed)
Patch Set: address comments on PS#3 Created 3 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include <array> 5 #include <array>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // chooseMediaAndGetStream() 199 // chooseMediaAndGetStream()
200 {true, true, false, false, 200 {true, true, false, false,
201 content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN, 201 content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN,
202 webrtc::kFullDesktopScreenId)}, 202 webrtc::kFullDesktopScreenId)},
203 // chooseMediaAndTryGetStreamWithInvalidId() 203 // chooseMediaAndTryGetStreamWithInvalidId()
204 {true, true, false, false, 204 {true, true, false, false,
205 content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN, 205 content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN,
206 webrtc::kFullDesktopScreenId)}, 206 webrtc::kFullDesktopScreenId)},
207 // cancelDialog() 207 // cancelDialog()
208 {true, true, false, false, content::DesktopMediaID(), true}, 208 {true, true, false, false, content::DesktopMediaID(), true},
209 // tabShareWithAudioGetStream() 209
210 {false, false, true, true,
211 content::DesktopMediaID(content::DesktopMediaID::TYPE_WEB_CONTENTS, 0,
212 true)},
213 // windowShareWithAudioGetStream()
214 {false, true, false, true,
215 content::DesktopMediaID(content::DesktopMediaID::TYPE_WINDOW, 0, true)},
216 // screenShareWithAudioGetStream() 210 // screenShareWithAudioGetStream()
217 {true, false, false, true, 211 {true, false, false, true,
218 content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN, 212 content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN,
219 webrtc::kFullDesktopScreenId, true)}, 213 webrtc::kFullDesktopScreenId, true)},
220 // tabShareWithoutAudioGetStream() 214
miu 2017/03/06 22:37:33 I'm worried about these deletions. Instead, can we
braveyao 2017/03/08 22:02:51 Done.
221 {false, false, true, true,
222 content::DesktopMediaID(content::DesktopMediaID::TYPE_WEB_CONTENTS, 0)},
223 // windowShareWithoutAudioGetStream()
224 {false, true, false, true,
225 content::DesktopMediaID(content::DesktopMediaID::TYPE_WINDOW, 0)},
226 // screenShareWithoutAudioGetStream() 215 // screenShareWithoutAudioGetStream()
227 {true, false, false, true, 216 {true, false, false, true,
228 content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN, 217 content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN,
229 webrtc::kFullDesktopScreenId)}, 218 webrtc::kFullDesktopScreenId)},
230 }; 219 };
231 picker_factory_.SetTestFlags(test_flags, arraysize(test_flags)); 220 picker_factory_.SetTestFlags(test_flags, arraysize(test_flags));
232 ASSERT_TRUE(RunExtensionTest("desktop_capture")) << message_; 221 ASSERT_TRUE(RunExtensionTest("desktop_capture")) << message_;
233 } 222 }
234 223
235 // Test is flaky http://crbug.com/301887. 224 // Test is flaky http://crbug.com/301887.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 EXPECT_TRUE(result); 275 EXPECT_TRUE(result);
287 EXPECT_TRUE(test_flags[2].picker_created); 276 EXPECT_TRUE(test_flags[2].picker_created);
288 EXPECT_FALSE(test_flags[2].picker_deleted); 277 EXPECT_FALSE(test_flags[2].picker_deleted);
289 278
290 web_contents->Close(); 279 web_contents->Close();
291 destroyed_watcher.Wait(); 280 destroyed_watcher.Wait();
292 EXPECT_TRUE(test_flags[2].picker_deleted); 281 EXPECT_TRUE(test_flags[2].picker_deleted);
293 } 282 }
294 283
295 } // namespace extensions 284 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698