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

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

Issue 1975533002: Change ui::Event::time_stamp from TimeDelta to TimeTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates Created 4 years, 7 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 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 TEST_F(DesktopMediaPickerViewsTest, DoneCallbackCalledOnDoubleTap) { 182 TEST_F(DesktopMediaPickerViewsTest, DoneCallbackCalledOnDoubleTap) {
183 const DesktopMediaID kFakeId(DesktopMediaID::TYPE_SCREEN, 222); 183 const DesktopMediaID kFakeId(DesktopMediaID::TYPE_SCREEN, 222);
184 EXPECT_CALL(*this, OnPickerDone(kFakeId)); 184 EXPECT_CALL(*this, OnPickerDone(kFakeId));
185 185
186 EXPECT_TRUE(ClickSourceTypeButton(DesktopMediaID::TYPE_SCREEN)); 186 EXPECT_TRUE(ClickSourceTypeButton(DesktopMediaID::TYPE_SCREEN));
187 GetPickerDialogView()->GetCheckboxForTesting()->SetChecked(false); 187 GetPickerDialogView()->GetCheckboxForTesting()->SetChecked(false);
188 188
189 media_lists_[DesktopMediaID::TYPE_SCREEN]->AddSourceByFullMediaID(kFakeId); 189 media_lists_[DesktopMediaID::TYPE_SCREEN]->AddSourceByFullMediaID(kFakeId);
190 ui::GestureEventDetails details(ui::ET_GESTURE_TAP); 190 ui::GestureEventDetails details(ui::ET_GESTURE_TAP);
191 details.set_tap_count(2); 191 details.set_tap_count(2);
192 ui::GestureEvent double_tap(10, 10, 0, base::TimeDelta(), details); 192 ui::GestureEvent double_tap(10, 10, 0, base::TimeTicks(), details);
193 193
194 GetPickerDialogView()->GetMediaSourceViewForTesting(0)->OnGestureEvent( 194 GetPickerDialogView()->GetMediaSourceViewForTesting(0)->OnGestureEvent(
195 &double_tap); 195 &double_tap);
196 base::RunLoop().RunUntilIdle(); 196 base::RunLoop().RunUntilIdle();
197 } 197 }
198 198
199 TEST_F(DesktopMediaPickerViewsTest, CancelButtonAlwaysEnabled) { 199 TEST_F(DesktopMediaPickerViewsTest, CancelButtonAlwaysEnabled) {
200 EXPECT_TRUE( 200 EXPECT_TRUE(
201 GetPickerDialogView()->IsDialogButtonEnabled(ui::DIALOG_BUTTON_CANCEL)); 201 GetPickerDialogView()->IsDialogButtonEnabled(ui::DIALOG_BUTTON_CANCEL));
202 } 202 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 EXPECT_TRUE(ClickSourceTypeButton(DesktopMediaID::TYPE_WEB_CONTENTS)); 306 EXPECT_TRUE(ClickSourceTypeButton(DesktopMediaID::TYPE_WEB_CONTENTS));
307 GetPickerDialogView()->GetCheckboxForTesting()->SetChecked(true); 307 GetPickerDialogView()->GetCheckboxForTesting()->SetChecked(true);
308 GetPickerDialogView()->GetMediaSourceViewForTesting(0)->OnFocus(); 308 GetPickerDialogView()->GetMediaSourceViewForTesting(0)->OnFocus();
309 309
310 GetPickerDialogView()->GetDialogClientView()->AcceptWindow(); 310 GetPickerDialogView()->GetDialogClientView()->AcceptWindow();
311 base::RunLoop().RunUntilIdle(); 311 base::RunLoop().RunUntilIdle();
312 } 312 }
313 313
314 } // namespace views 314 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698