| 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 "base/location.h" | 5 #include "base/location.h" |
| 6 #include "base/macros.h" | 6 #include "base/macros.h" |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 EXPECT_FALSE(view_controller->is_showing_popup()); | 329 EXPECT_FALSE(view_controller->is_showing_popup()); |
| 330 EXPECT_EQ(nullptr, toolbar_actions_bar->popup_owner()); | 330 EXPECT_EQ(nullptr, toolbar_actions_bar->popup_owner()); |
| 331 | 331 |
| 332 // Releasing the mouse shouldn't result in the popup being shown again. | 332 // Releasing the mouse shouldn't result in the popup being shown again. |
| 333 EXPECT_TRUE( | 333 EXPECT_TRUE( |
| 334 ui_test_utils::SendMouseEventsSync(ui_controls::LEFT, ui_controls::UP)); | 334 ui_test_utils::SendMouseEventsSync(ui_controls::LEFT, ui_controls::UP)); |
| 335 EXPECT_FALSE(view_controller->is_showing_popup()); | 335 EXPECT_FALSE(view_controller->is_showing_popup()); |
| 336 EXPECT_EQ(nullptr, toolbar_actions_bar->popup_owner()); | 336 EXPECT_EQ(nullptr, toolbar_actions_bar->popup_owner()); |
| 337 } | 337 } |
| 338 | 338 |
| 339 #if defined(USE_OZONE) | 339 #if defined(USE_OZONE) || defined(OS_WIN) |
| 340 // ozone bringup - http://crbug.com/401304 | 340 // ozone bringup - http://crbug.com/401304 |
| 341 // flaky on Windows - http://crbug.com/638692 |
| 341 #define MAYBE_ActivateOverflowedToolbarActionWithKeyboard \ | 342 #define MAYBE_ActivateOverflowedToolbarActionWithKeyboard \ |
| 342 DISABLED_ActivateOverflowedToolbarActionWithKeyboard | 343 DISABLED_ActivateOverflowedToolbarActionWithKeyboard |
| 343 #else | 344 #else |
| 344 #define MAYBE_ActivateOverflowedToolbarActionWithKeyboard \ | 345 #define MAYBE_ActivateOverflowedToolbarActionWithKeyboard \ |
| 345 ActivateOverflowedToolbarActionWithKeyboard | 346 ActivateOverflowedToolbarActionWithKeyboard |
| 346 #endif | 347 #endif |
| 347 IN_PROC_BROWSER_TEST_F(ToolbarActionViewInteractiveUITest, | 348 IN_PROC_BROWSER_TEST_F(ToolbarActionViewInteractiveUITest, |
| 348 MAYBE_ActivateOverflowedToolbarActionWithKeyboard) { | 349 MAYBE_ActivateOverflowedToolbarActionWithKeyboard) { |
| 349 views::MenuController::TurnOffMenuSelectionHoldForTest(); | 350 views::MenuController::TurnOffMenuSelectionHoldForTest(); |
| 350 // Load an extension with an action. | 351 // Load an extension with an action. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 ui_controls::SendKeyPressNotifyWhenDone(native_window, ui::VKEY_RETURN, false, | 383 ui_controls::SendKeyPressNotifyWhenDone(native_window, ui::VKEY_RETURN, false, |
| 383 false, false, false, | 384 false, false, false, |
| 384 loop.QuitClosure()); | 385 loop.QuitClosure()); |
| 385 loop.Run(); | 386 loop.Run(); |
| 386 | 387 |
| 387 // The menu should be closed. | 388 // The menu should be closed. |
| 388 EXPECT_FALSE(app_menu_button->IsMenuShowing()); | 389 EXPECT_FALSE(app_menu_button->IsMenuShowing()); |
| 389 // And the extension should have been activated. | 390 // And the extension should have been activated. |
| 390 EXPECT_TRUE(listener.WaitUntilSatisfied()); | 391 EXPECT_TRUE(listener.WaitUntilSatisfied()); |
| 391 } | 392 } |
| OLD | NEW |