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

Unified Diff: ash/wm/screen_dimmer_unittest.cc

Issue 2359633003: Makes ScreenDimmer deal with the shell going away (Closed)
Patch Set: comment Created 4 years, 3 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
« ash/common/wm/screen_dimmer.cc ('K') | « ash/common/wm/screen_dimmer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/screen_dimmer_unittest.cc
diff --git a/ash/wm/screen_dimmer_unittest.cc b/ash/wm/screen_dimmer_unittest.cc
index 336b47b1c52ecbba119ff5b74bb0431caac1314b..ea9d0956f551209d86d575e797c860eb23923f67 100644
--- a/ash/wm/screen_dimmer_unittest.cc
+++ b/ash/wm/screen_dimmer_unittest.cc
@@ -120,5 +120,26 @@ TEST_F(ScreenDimmerTest, DimAtBottom) {
EXPECT_EQ(*dim_iter, *root_window->children().begin());
}
+// See description above TEST_F for details.
+class ScreenDimmerShellDestructionTest : public AshTestBase {
+ public:
+ ScreenDimmerShellDestructionTest() {}
+ ~ScreenDimmerShellDestructionTest() override {}
+
+ void TearDown() override {
+ ScreenDimmer screen_dimmer(ScreenDimmer::Container::ROOT);
+ AshTestBase::TearDown();
+ }
James Cook 2016/09/20 23:26:18 I would add a comment above this line pointing out
sky 2016/09/20 23:33:19 Done.
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ScreenDimmerShellDestructionTest);
+};
+
+// This test verifies ScreenDimmer can be destroyed after the shell. The
+// interesting part of this test is in TearDown(), which creates a ScreenDimmer
+// that is deleted after WmShell.
+TEST_F(ScreenDimmerShellDestructionTest, DontCrashIfScreenDimmerOutlivesShell) {
+}
+
} // namespace test
} // namespace ash
« ash/common/wm/screen_dimmer.cc ('K') | « ash/common/wm/screen_dimmer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698