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

Side by Side Diff: ash/system/toast/toast_manager_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/display/display_manager.h" 5 #include "ash/display/display_manager.h"
6 #include "ash/screen_util.h" 6 #include "ash/screen_util.h"
7 #include "ash/shelf/shelf.h" 7 #include "ash/shelf/shelf.h"
8 #include "ash/shelf/shelf_layout_manager.h" 8 #include "ash/shelf/shelf_layout_manager.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/toast/toast_manager.h" 10 #include "ash/system/toast/toast_manager.h"
11 #include "ash/test/ash_test_base.h" 11 #include "ash/test/ash_test_base.h"
12 #include "base/run_loop.h" 12 #include "base/run_loop.h"
13 #include "ui/compositor/scoped_animation_duration_scale_mode.h" 13 #include "ui/compositor/scoped_animation_duration_scale_mode.h"
14 14
15 namespace ash { 15 namespace ash {
16 16
17 // Long duration so the timeout doesn't occur. 17 // Long duration so the timeout doesn't occur.
18 const int64_t kLongLongDuration = INT64_MAX; 18 const int64_t kLongLongDuration = INT64_MAX;
19 19
20 class DummyEvent : public ui::Event { 20 class DummyEvent : public ui::Event {
21 public: 21 public:
22 DummyEvent() : Event(ui::ET_UNKNOWN, base::TimeDelta(), 0) {} 22 DummyEvent() : Event(ui::ET_UNKNOWN, base::TimeTicks(), 0) {}
23 ~DummyEvent() override {} 23 ~DummyEvent() override {}
24 }; 24 };
25 25
26 class ToastManagerTest : public test::AshTestBase { 26 class ToastManagerTest : public test::AshTestBase {
27 public: 27 public:
28 ToastManagerTest() {} 28 ToastManagerTest() {}
29 ~ToastManagerTest() override {} 29 ~ToastManagerTest() override {}
30 30
31 private: 31 private:
32 void SetUp() override { 32 void SetUp() override {
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // doesn't return correct value. 266 // doesn't return correct value.
267 gfx::Rect shelf_bounds = shelf->GetIdealBounds(); 267 gfx::Rect shelf_bounds = shelf->GetIdealBounds();
268 EXPECT_FALSE(toast_bounds.Intersects(shelf_bounds)); 268 EXPECT_FALSE(toast_bounds.Intersects(shelf_bounds));
269 EXPECT_EQ(shelf_bounds.y() - 5, toast_bounds.bottom()); 269 EXPECT_EQ(shelf_bounds.y() - 5, toast_bounds.bottom());
270 EXPECT_EQ(root_bounds.bottom() - shelf_bounds.height() - 5, 270 EXPECT_EQ(root_bounds.bottom() - shelf_bounds.height() - 5,
271 toast_bounds.bottom()); 271 toast_bounds.bottom());
272 } 272 }
273 } 273 }
274 274
275 } // namespace ash 275 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698