| OLD | NEW |
| 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 "base/memory/scoped_ptr.h" |
| 5 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
| 6 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 7 #include "chrome/browser/ui/toolbar/test_toolbar_actions_bar_bubble_delegate.h" | 8 #include "chrome/browser/ui/toolbar/test_toolbar_actions_bar_bubble_delegate.h" |
| 8 #include "chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h" | 9 #include "chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h" |
| 9 #include "ui/events/event_utils.h" | 10 #include "ui/events/event_utils.h" |
| 10 #include "ui/events/test/event_generator.h" | 11 #include "ui/events/test/event_generator.h" |
| 11 #include "ui/views/bubble/bubble_delegate.h" | 12 #include "ui/views/bubble/bubble_delegate.h" |
| 12 #include "ui/views/controls/button/label_button.h" | 13 #include "ui/views/controls/button/label_button.h" |
| 13 #include "ui/views/test/test_widget_observer.h" | 14 #include "ui/views/test/test_widget_observer.h" |
| 14 #include "ui/views/test/views_test_base.h" | 15 #include "ui/views/test/views_test_base.h" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 bubble->Show(); | 173 bubble->Show(); |
| 173 | 174 |
| 174 EXPECT_FALSE(delegate.close_action()); | 175 EXPECT_FALSE(delegate.close_action()); |
| 175 // Activate another widget. The bubble shouldn't close. | 176 // Activate another widget. The bubble shouldn't close. |
| 176 anchor_widget->Activate(); | 177 anchor_widget->Activate(); |
| 177 base::RunLoop().RunUntilIdle(); | 178 base::RunLoop().RunUntilIdle(); |
| 178 EXPECT_FALSE(delegate.close_action()); | 179 EXPECT_FALSE(delegate.close_action()); |
| 179 bubble_widget->Close(); | 180 bubble_widget->Close(); |
| 180 base::RunLoop().RunUntilIdle(); | 181 base::RunLoop().RunUntilIdle(); |
| 181 } | 182 } |
| OLD | NEW |