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

Side by Side Diff: chrome/browser/ui/views/desktop_capture/desktop_media_picker_views_unittest.cc

Issue 2346253003: Disabled DesktopMediaPickerViewsTest.DoneCallbackCalledOnOkButtonPressed test on Windows (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | 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 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 #include "chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.h" 5 #include "chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.h"
6 6
7 #include <map> 7 #include <map>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 std::unique_ptr<DesktopMediaPickerViews> picker_views_; 92 std::unique_ptr<DesktopMediaPickerViews> picker_views_;
93 }; 93 };
94 94
95 TEST_F(DesktopMediaPickerViewsTest, DoneCallbackCalledWhenWindowClosed) { 95 TEST_F(DesktopMediaPickerViewsTest, DoneCallbackCalledWhenWindowClosed) {
96 EXPECT_CALL(*this, OnPickerDone(content::DesktopMediaID())); 96 EXPECT_CALL(*this, OnPickerDone(content::DesktopMediaID()));
97 97
98 GetPickerDialogView()->GetWidget()->Close(); 98 GetPickerDialogView()->GetWidget()->Close();
99 base::RunLoop().RunUntilIdle(); 99 base::RunLoop().RunUntilIdle();
100 } 100 }
101 101
102 TEST_F(DesktopMediaPickerViewsTest, DoneCallbackCalledOnOkButtonPressed) { 102 // Flaky on Windows. https://crbug.com/644614
103 #if defined(OS_WIN)
104 #define MAYBE_DoneCallbackCalledOnOkButtonPressed DISABLED_DoneCallbackCalledOnO kButtonPressed
105 #else
106 #define MAYBE_DoneCallbackCalledOnOkButtonPressed DoneCallbackCalledOnOkButtonPr essed
107 #endif
108
109 TEST_F(DesktopMediaPickerViewsTest, MAYBE_DoneCallbackCalledOnOkButtonPressed) {
103 const DesktopMediaID kFakeId(DesktopMediaID::TYPE_WINDOW, 222); 110 const DesktopMediaID kFakeId(DesktopMediaID::TYPE_WINDOW, 222);
104 EXPECT_CALL(*this, OnPickerDone(kFakeId)); 111 EXPECT_CALL(*this, OnPickerDone(kFakeId));
105 112
106 media_lists_[DesktopMediaID::TYPE_WINDOW]->AddSourceByFullMediaID(kFakeId); 113 media_lists_[DesktopMediaID::TYPE_WINDOW]->AddSourceByFullMediaID(kFakeId);
107 GetPickerDialogView()->GetCheckboxForTesting()->SetChecked(true); 114 GetPickerDialogView()->GetCheckboxForTesting()->SetChecked(true);
108 115
109 EXPECT_FALSE( 116 EXPECT_FALSE(
110 GetPickerDialogView()->IsDialogButtonEnabled(ui::DIALOG_BUTTON_OK)); 117 GetPickerDialogView()->IsDialogButtonEnabled(ui::DIALOG_BUTTON_OK));
111 118
112 EXPECT_TRUE(ClickSourceTypeButton(DesktopMediaID::TYPE_WINDOW)); 119 EXPECT_TRUE(ClickSourceTypeButton(DesktopMediaID::TYPE_WINDOW));
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 314
308 EXPECT_TRUE(ClickSourceTypeButton(DesktopMediaID::TYPE_WEB_CONTENTS)); 315 EXPECT_TRUE(ClickSourceTypeButton(DesktopMediaID::TYPE_WEB_CONTENTS));
309 GetPickerDialogView()->GetCheckboxForTesting()->SetChecked(true); 316 GetPickerDialogView()->GetCheckboxForTesting()->SetChecked(true);
310 GetPickerDialogView()->GetMediaSourceViewForTesting(0)->OnFocus(); 317 GetPickerDialogView()->GetMediaSourceViewForTesting(0)->OnFocus();
311 318
312 GetPickerDialogView()->GetDialogClientView()->AcceptWindow(); 319 GetPickerDialogView()->GetDialogClientView()->AcceptWindow();
313 base::RunLoop().RunUntilIdle(); 320 base::RunLoop().RunUntilIdle();
314 } 321 }
315 322
316 } // namespace views 323 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698