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

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: 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
« no previous file with comments | « ash/system/overview/overview_button_tray_unittest.cc ('k') | ash/touch/touch_hud_debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
14 #include "ui/compositor/scoped_animation_duration_scale_mode.h" 14 #include "ui/compositor/scoped_animation_duration_scale_mode.h"
15 15
16 namespace ash { 16 namespace ash {
17 17
18 // Long duration so the timeout doesn't occur. 18 // Long duration so the timeout doesn't occur.
19 const int32_t kLongLongDuration = INT32_MAX; 19 const int32_t kLongLongDuration = INT32_MAX;
20 20
21 class DummyEvent : public ui::Event { 21 class DummyEvent : public ui::Event {
22 public: 22 public:
23 DummyEvent() : Event(ui::ET_UNKNOWN, base::TimeDelta(), 0) {} 23 DummyEvent() : Event(ui::ET_UNKNOWN, base::TimeTicks(), 0) {}
24 ~DummyEvent() override {} 24 ~DummyEvent() override {}
25 }; 25 };
26 26
27 class ToastManagerTest : public test::AshTestBase { 27 class ToastManagerTest : public test::AshTestBase {
28 public: 28 public:
29 ToastManagerTest() {} 29 ToastManagerTest() {}
30 ~ToastManagerTest() override {} 30 ~ToastManagerTest() override {}
31 31
32 private: 32 private:
33 void SetUp() override { 33 void SetUp() override {
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 EXPECT_EQ("TEXT3", GetCurrentText()); 298 EXPECT_EQ("TEXT3", GetCurrentText());
299 // Cancel the shown toast. 299 // Cancel the shown toast.
300 CancelToast(id3); 300 CancelToast(id3);
301 // Confirm that the shown toast disappears. 301 // Confirm that the shown toast disappears.
302 EXPECT_FALSE(GetCurrentOverlay()); 302 EXPECT_FALSE(GetCurrentOverlay());
303 // Confirm that only 1 toast is shown. 303 // Confirm that only 1 toast is shown.
304 EXPECT_EQ(2, GetToastSerial()); 304 EXPECT_EQ(2, GetToastSerial());
305 } 305 }
306 306
307 } // namespace ash 307 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/overview/overview_button_tray_unittest.cc ('k') | ash/touch/touch_hud_debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698