Chromium Code Reviews| Index: ash/wm/overlay_event_filter_unittest.cc |
| diff --git a/ash/wm/overlay_event_filter_unittest.cc b/ash/wm/overlay_event_filter_unittest.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..29ff96b103c7a6b0d913c2668076b2be82b42b8b |
| --- /dev/null |
| +++ b/ash/wm/overlay_event_filter_unittest.cc |
| @@ -0,0 +1,34 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ash/wm/overlay_event_filter.h" |
| + |
| +#include "ash/shell.h" |
| +#include "ash/test/ash_test_base.h" |
| +#include "ash/test/test_overlay_delegate.h" |
| + |
| +namespace ash { |
| +namespace test { |
| + |
| +typedef AshTestBase OverlayEventFilterTest; |
| + |
| +TEST_F(OverlayEventFilterTest, CancelAtActivating) { |
|
James Cook
2014/08/12 21:51:14
nit: A brief comment about what you are testing/wh
Jun Mukai
2014/08/12 22:51:02
Done.
|
| + TestOverlayDelegate d1; |
| + TestOverlayDelegate d2; |
| + |
| + Shell::GetInstance()->overlay_filter()->Activate(&d1); |
| + EXPECT_EQ(0, d1.GetCancelCountAndReset()); |
| + EXPECT_EQ(0, d2.GetCancelCountAndReset()); |
| + |
| + Shell::GetInstance()->overlay_filter()->Activate(&d2); |
| + EXPECT_EQ(1, d1.GetCancelCountAndReset()); |
| + EXPECT_EQ(0, d2.GetCancelCountAndReset()); |
| + |
| + Shell::GetInstance()->overlay_filter()->Cancel(); |
| + EXPECT_EQ(0, d1.GetCancelCountAndReset()); |
| + EXPECT_EQ(1, d2.GetCancelCountAndReset()); |
| +} |
| + |
| +} // namespace test |
| +} // namespace ash |