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

Side by Side Diff: ash/system/toast/toast_manager_unittest.cc

Issue 2738133003: Promotes a handful of members from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 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/chromeos/power/tablet_power_button_controller.cc ('k') | ash/test/shell_test_api.h » ('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/common/shelf/shelf_constants.h" 5 #include "ash/common/shelf/shelf_constants.h"
6 #include "ash/common/shelf/wm_shelf.h" 6 #include "ash/common/shelf/wm_shelf.h"
7 #include "ash/common/system/toast/toast_manager.h" 7 #include "ash/common/system/toast/toast_manager.h"
8 #include "ash/common/wm/wm_screen_util.h" 8 #include "ash/common/wm/wm_screen_util.h"
9 #include "ash/common/wm_shell.h" 9 #include "ash/common/wm_shell.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 16 matching lines...) Expand all
27 27
28 class ToastManagerTest : public test::AshTestBase { 28 class ToastManagerTest : public test::AshTestBase {
29 public: 29 public:
30 ToastManagerTest() {} 30 ToastManagerTest() {}
31 ~ToastManagerTest() override {} 31 ~ToastManagerTest() override {}
32 32
33 private: 33 private:
34 void SetUp() override { 34 void SetUp() override {
35 test::AshTestBase::SetUp(); 35 test::AshTestBase::SetUp();
36 36
37 manager_ = WmShell::Get()->toast_manager(); 37 manager_ = Shell::GetInstance()->toast_manager();
38 38
39 manager_->ResetSerialForTesting(); 39 manager_->ResetSerialForTesting();
40 EXPECT_EQ(0, GetToastSerial()); 40 EXPECT_EQ(0, GetToastSerial());
41 } 41 }
42 42
43 protected: 43 protected:
44 ToastManager* manager() { return manager_; } 44 ToastManager* manager() { return manager_; }
45 45
46 int GetToastSerial() { return manager_->serial_for_testing(); } 46 int GetToastSerial() { return manager_->serial_for_testing(); }
47 47
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 EXPECT_EQ(base::ASCIIToUTF16("TEXT3"), GetCurrentText()); 304 EXPECT_EQ(base::ASCIIToUTF16("TEXT3"), GetCurrentText());
305 // Cancel the shown toast. 305 // Cancel the shown toast.
306 CancelToast(id3); 306 CancelToast(id3);
307 // Confirm that the shown toast disappears. 307 // Confirm that the shown toast disappears.
308 EXPECT_FALSE(GetCurrentOverlay()); 308 EXPECT_FALSE(GetCurrentOverlay());
309 // Confirm that only 1 toast is shown. 309 // Confirm that only 1 toast is shown.
310 EXPECT_EQ(2, GetToastSerial()); 310 EXPECT_EQ(2, GetToastSerial());
311 } 311 }
312 312
313 } // namespace ash 313 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/power/tablet_power_button_controller.cc ('k') | ash/test/shell_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698