| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/bubble/bubble_manager.h" | 5 #include "components/bubble/bubble_manager.h" |
| 6 | 6 |
| 7 #include "base/macros.h" |
| 7 #include "components/bubble/bubble_controller.h" | 8 #include "components/bubble/bubble_controller.h" |
| 8 #include "components/bubble/bubble_manager_mocks.h" | 9 #include "components/bubble/bubble_manager_mocks.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 11 |
| 11 namespace { | 12 namespace { |
| 12 | 13 |
| 13 // A "show chain" happens when a bubble decides to show another bubble on close. | 14 // A "show chain" happens when a bubble decides to show another bubble on close. |
| 14 // All bubbles must be iterated to handle a close event. If a bubble shows | 15 // All bubbles must be iterated to handle a close event. If a bubble shows |
| 15 // another bubble while it's being closed, the iterator can get messed up. | 16 // another bubble while it's being closed, the iterator can get messed up. |
| 16 class ChainShowBubbleDelegate : public MockBubbleDelegate { | 17 class ChainShowBubbleDelegate : public MockBubbleDelegate { |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 EXPECT_TRUE(other_bubble_ref); | 398 EXPECT_TRUE(other_bubble_ref); |
| 398 EXPECT_TRUE(closing_bubble_ref); | 399 EXPECT_TRUE(closing_bubble_ref); |
| 399 | 400 |
| 400 closing_bubble_ref->CloseBubble(BUBBLE_CLOSE_ACCEPTED); | 401 closing_bubble_ref->CloseBubble(BUBBLE_CLOSE_ACCEPTED); |
| 401 | 402 |
| 402 EXPECT_TRUE(other_bubble_ref); | 403 EXPECT_TRUE(other_bubble_ref); |
| 403 EXPECT_TRUE(closing_bubble_ref); | 404 EXPECT_TRUE(closing_bubble_ref); |
| 404 } | 405 } |
| 405 | 406 |
| 406 } // namespace | 407 } // namespace |
| OLD | NEW |