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

Unified Diff: ui/views/controls/menu/menu_runner_cocoa_unittest.mm

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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/menu/menu_controller.cc ('k') | ui/views/controls/menu/menu_runner_impl_cocoa.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_runner_cocoa_unittest.mm
diff --git a/ui/views/controls/menu/menu_runner_cocoa_unittest.mm b/ui/views/controls/menu/menu_runner_cocoa_unittest.mm
index ee86b98275691c9349bcf84962c0bf5838d70af2..e1a8c49e47f37cdab730fb934991636828b094fe 100644
--- a/ui/views/controls/menu/menu_runner_cocoa_unittest.mm
+++ b/ui/views/controls/menu/menu_runner_cocoa_unittest.mm
@@ -165,8 +165,8 @@ class MenuRunnerCocoaTest : public ViewsTestBase {
DISALLOW_COPY_AND_ASSIGN(MenuRunnerCocoaTest);
};
-TEST_F(MenuRunnerCocoaTest, RunMenuAndCancel) {
- base::TimeDelta min_time = ui::EventTimeForNow();
+TEST_F(MenuRunnerCocoaTest, RunMenkjuAndCancel) {
sadrul 2016/05/25 20:22:10 unrename?
majidvp 2016/05/27 14:34:15 Done.
+ base::TimeDelta min_time = (ui::EventTimeForNow() - base::TimeTicks());
MenuRunner::RunResult result = RunMenu(base::Bind(
&MenuRunnerCocoaTest::MenuCancelCallback, base::Unretained(this)));
@@ -175,7 +175,8 @@ TEST_F(MenuRunnerCocoaTest, RunMenuAndCancel) {
EXPECT_FALSE(runner_->IsRunning());
EXPECT_GE(runner_->GetClosingEventTime(), min_time);
- EXPECT_LE(runner_->GetClosingEventTime(), ui::EventTimeForNow());
+ EXPECT_LE(runner_->GetClosingEventTime(),
+ (ui::EventTimeForNow() - base::TimeTicks()));
sadrul 2016/05/25 20:22:10 I assume addressing the TODO in menu_controller.h
majidvp 2016/05/27 14:34:15 Yes indeed.
// Cancel again.
runner_->Cancel();
« no previous file with comments | « ui/views/controls/menu/menu_controller.cc ('k') | ui/views/controls/menu/menu_runner_impl_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698