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

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

Issue 1838623002: Bring Audio Share and Tab Share Default On (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 <queue> 5 #include <queue>
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 } // namespace 155 } // namespace
156 156
157 // Flaky on Windows: http://crbug.com/301887 157 // Flaky on Windows: http://crbug.com/301887
158 #if defined(OS_WIN) 158 #if defined(OS_WIN)
159 #define MAYBE_ChooseDesktopMedia DISABLED_ChooseDesktopMedia 159 #define MAYBE_ChooseDesktopMedia DISABLED_ChooseDesktopMedia
160 #else 160 #else
161 #define MAYBE_ChooseDesktopMedia ChooseDesktopMedia 161 #define MAYBE_ChooseDesktopMedia ChooseDesktopMedia
162 #endif 162 #endif
163 IN_PROC_BROWSER_TEST_F(DesktopCaptureApiTest, MAYBE_ChooseDesktopMedia) { 163 IN_PROC_BROWSER_TEST_F(DesktopCaptureApiTest, MAYBE_ChooseDesktopMedia) {
164 // For tab and audio share, we need to turn on the flag, because the
165 // functionality is currently behind the flags.
166 base::CommandLine::ForCurrentProcess()->AppendSwitch(
167 extensions::switches::kEnableTabForDesktopShare);
168 base::CommandLine::ForCurrentProcess()->AppendSwitch(
169 extensions::switches::kEnableDesktopCaptureAudio);
170
171 // Each element in the following array corresponds to one test in 164 // Each element in the following array corresponds to one test in
172 // chrome/test/data/extensions/api_test/desktop_capture/test.js . 165 // chrome/test/data/extensions/api_test/desktop_capture/test.js .
173 TestFlags test_flags[] = { 166 TestFlags test_flags[] = {
174 // pickerUiCanceled() 167 // pickerUiCanceled()
175 {true, true, false, false, content::DesktopMediaID()}, 168 {true, true, false, false, content::DesktopMediaID()},
176 // chooseMedia() 169 // chooseMedia()
177 {true, true, false, false, 170 {true, true, false, false,
178 content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN, 171 content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN,
179 content::DesktopMediaID::kNullId)}, 172 content::DesktopMediaID::kNullId)},
180 // screensOnly() 173 // screensOnly()
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 EXPECT_TRUE(result); 268 EXPECT_TRUE(result);
276 EXPECT_TRUE(test_flags[2].picker_created); 269 EXPECT_TRUE(test_flags[2].picker_created);
277 EXPECT_FALSE(test_flags[2].picker_deleted); 270 EXPECT_FALSE(test_flags[2].picker_deleted);
278 271
279 web_contents->Close(); 272 web_contents->Close();
280 destroyed_watcher.Wait(); 273 destroyed_watcher.Wait();
281 EXPECT_TRUE(test_flags[2].picker_deleted); 274 EXPECT_TRUE(test_flags[2].picker_deleted);
282 } 275 }
283 276
284 } // namespace extensions 277 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698