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

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: rebase Created 4 years, 6 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 TEST_F(DesktopMediaPickerViewsTest, DoneCallbackCalledOnDoubleTap) { 184 TEST_F(DesktopMediaPickerViewsTest, DoneCallbackCalledOnDoubleTap) {
185 const DesktopMediaID kFakeId(DesktopMediaID::TYPE_SCREEN, 222); 185 const DesktopMediaID kFakeId(DesktopMediaID::TYPE_SCREEN, 222);
186 EXPECT_CALL(*this, OnPickerDone(kFakeId)); 186 EXPECT_CALL(*this, OnPickerDone(kFakeId));
187 187
188 EXPECT_TRUE(ClickSourceTypeButton(DesktopMediaID::TYPE_SCREEN)); 188 EXPECT_TRUE(ClickSourceTypeButton(DesktopMediaID::TYPE_SCREEN));
189 GetPickerDialogView()->GetCheckboxForTesting()->SetChecked(false); 189 GetPickerDialogView()->GetCheckboxForTesting()->SetChecked(false);
190 190
191 media_lists_[DesktopMediaID::TYPE_SCREEN]->AddSourceByFullMediaID(kFakeId); 191 media_lists_[DesktopMediaID::TYPE_SCREEN]->AddSourceByFullMediaID(kFakeId);
192 ui::GestureEventDetails details(ui::ET_GESTURE_TAP); 192 ui::GestureEventDetails details(ui::ET_GESTURE_TAP);
193 details.set_tap_count(2); 193 details.set_tap_count(2);
194 ui::GestureEvent double_tap(10, 10, 0, base::TimeDelta(), details); 194 ui::GestureEvent double_tap(10, 10, 0, base::TimeTicks(), details);
195 195
196 GetPickerDialogView()->GetMediaSourceViewForTesting(0)->OnGestureEvent( 196 GetPickerDialogView()->GetMediaSourceViewForTesting(0)->OnGestureEvent(
197 &double_tap); 197 &double_tap);
198 base::RunLoop().RunUntilIdle(); 198 base::RunLoop().RunUntilIdle();
199 } 199 }
200 200
201 TEST_F(DesktopMediaPickerViewsTest, CancelButtonAlwaysEnabled) { 201 TEST_F(DesktopMediaPickerViewsTest, CancelButtonAlwaysEnabled) {
202 EXPECT_TRUE( 202 EXPECT_TRUE(
203 GetPickerDialogView()->IsDialogButtonEnabled(ui::DIALOG_BUTTON_CANCEL)); 203 GetPickerDialogView()->IsDialogButtonEnabled(ui::DIALOG_BUTTON_CANCEL));
204 } 204 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 307
308 EXPECT_TRUE(ClickSourceTypeButton(DesktopMediaID::TYPE_WEB_CONTENTS)); 308 EXPECT_TRUE(ClickSourceTypeButton(DesktopMediaID::TYPE_WEB_CONTENTS));
309 GetPickerDialogView()->GetCheckboxForTesting()->SetChecked(true); 309 GetPickerDialogView()->GetCheckboxForTesting()->SetChecked(true);
310 GetPickerDialogView()->GetMediaSourceViewForTesting(0)->OnFocus(); 310 GetPickerDialogView()->GetMediaSourceViewForTesting(0)->OnFocus();
311 311
312 GetPickerDialogView()->GetDialogClientView()->AcceptWindow(); 312 GetPickerDialogView()->GetDialogClientView()->AcceptWindow();
313 base::RunLoop().RunUntilIdle(); 313 base::RunLoop().RunUntilIdle();
314 } 314 }
315 315
316 } // namespace views 316 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698