| OLD | NEW |
| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 replacements.SetPortStr(port); | 164 replacements.SetPortStr(port); |
| 165 return embedded_test_server()->GetURL(path).ReplaceComponents(replacements); | 165 return embedded_test_server()->GetURL(path).ReplaceComponents(replacements); |
| 166 } | 166 } |
| 167 | 167 |
| 168 FakeDesktopMediaPickerFactory picker_factory_; | 168 FakeDesktopMediaPickerFactory picker_factory_; |
| 169 }; | 169 }; |
| 170 | 170 |
| 171 } // namespace | 171 } // namespace |
| 172 | 172 |
| 173 // Flaky on Windows: http://crbug.com/301887 | 173 // Flaky on Windows: http://crbug.com/301887 |
| 174 #if defined(OS_WIN) | 174 // Fails on Ozone Chrome OS: http://crbug.com/718512 |
| 175 #if defined(OS_WIN) || (defined(OS_CHROMEOS) && defined(USE_OZONE)) |
| 175 #define MAYBE_ChooseDesktopMedia DISABLED_ChooseDesktopMedia | 176 #define MAYBE_ChooseDesktopMedia DISABLED_ChooseDesktopMedia |
| 176 #else | 177 #else |
| 177 #define MAYBE_ChooseDesktopMedia ChooseDesktopMedia | 178 #define MAYBE_ChooseDesktopMedia ChooseDesktopMedia |
| 178 #endif | 179 #endif |
| 179 IN_PROC_BROWSER_TEST_F(DesktopCaptureApiTest, MAYBE_ChooseDesktopMedia) { | 180 IN_PROC_BROWSER_TEST_F(DesktopCaptureApiTest, MAYBE_ChooseDesktopMedia) { |
| 180 // Each element in the following array corresponds to one test in | 181 // Each element in the following array corresponds to one test in |
| 181 // chrome/test/data/extensions/api_test/desktop_capture/test.js . | 182 // chrome/test/data/extensions/api_test/desktop_capture/test.js . |
| 182 TestFlags test_flags[] = { | 183 TestFlags test_flags[] = { |
| 183 // pickerUiCanceled() | 184 // pickerUiCanceled() |
| 184 {true, true, false, false, content::DesktopMediaID()}, | 185 {true, true, false, false, content::DesktopMediaID()}, |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 EXPECT_TRUE(result); | 295 EXPECT_TRUE(result); |
| 295 EXPECT_TRUE(test_flags[2].picker_created); | 296 EXPECT_TRUE(test_flags[2].picker_created); |
| 296 EXPECT_FALSE(test_flags[2].picker_deleted); | 297 EXPECT_FALSE(test_flags[2].picker_deleted); |
| 297 | 298 |
| 298 web_contents->Close(); | 299 web_contents->Close(); |
| 299 destroyed_watcher.Wait(); | 300 destroyed_watcher.Wait(); |
| 300 EXPECT_TRUE(test_flags[2].picker_deleted); | 301 EXPECT_TRUE(test_flags[2].picker_deleted); |
| 301 } | 302 } |
| 302 | 303 |
| 303 } // namespace extensions | 304 } // namespace extensions |
| OLD | NEW |