Chromium Code Reviews| 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 |