OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/strings/utf_string_conversions.h" | 5 #include "base/strings/utf_string_conversions.h" |
6 #include "chrome/browser/ui/views/menu_test_base.h" | 6 #include "chrome/browser/ui/views/menu_test_base.h" |
7 #include "chrome/test/base/interactive_test_utils.h" | 7 #include "chrome/test/base/interactive_test_utils.h" |
8 #include "ui/base/dragdrop/drag_drop_types.h" | 8 #include "ui/base/dragdrop/drag_drop_types.h" |
9 #include "ui/base/dragdrop/os_exchange_data.h" | 9 #include "ui/base/dragdrop/os_exchange_data.h" |
10 #include "ui/views/controls/menu/menu_controller.h" | 10 #include "ui/views/controls/menu/menu_controller.h" |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 EXPECT_FALSE(target_view()->dropped()); | 341 EXPECT_FALSE(target_view()->dropped()); |
342 EXPECT_FALSE(asked_to_close()); | 342 EXPECT_FALSE(asked_to_close()); |
343 EXPECT_FALSE(menu()->GetSubmenu()->IsShowing()); | 343 EXPECT_FALSE(menu()->GetSubmenu()->IsShowing()); |
344 | 344 |
345 Done(); | 345 Done(); |
346 } | 346 } |
347 | 347 |
348 // Test that an in-menu (i.e., entirely implemented in the menu code) closes the | 348 // Test that an in-menu (i.e., entirely implemented in the menu code) closes the |
349 // menu automatically once the drag is complete, and does not ask the delegate | 349 // menu automatically once the drag is complete, and does not ask the delegate |
350 // to stay open. | 350 // to stay open. |
| 351 #if !defined(OS_WIN) // flaky http://crbug.com/401226 |
351 VIEW_TEST(MenuViewDragAndDropTestTestInMenuDrag, MAYBE(TestInMenuDrag)) | 352 VIEW_TEST(MenuViewDragAndDropTestTestInMenuDrag, MAYBE(TestInMenuDrag)) |
| 353 #endif |
352 | 354 |
353 class MenuViewDragAndDropTestNestedDrag : public MenuViewDragAndDropTest { | 355 class MenuViewDragAndDropTestNestedDrag : public MenuViewDragAndDropTest { |
354 public: | 356 public: |
355 MenuViewDragAndDropTestNestedDrag() {} | 357 MenuViewDragAndDropTestNestedDrag() {} |
356 virtual ~MenuViewDragAndDropTestNestedDrag() {} | 358 virtual ~MenuViewDragAndDropTestNestedDrag() {} |
357 | 359 |
358 private: | 360 private: |
359 // MenuViewDragAndDropTest: | 361 // MenuViewDragAndDropTest: |
360 virtual void DoTestWithMenuOpen() OVERRIDE; | 362 virtual void DoTestWithMenuOpen() OVERRIDE; |
361 | 363 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 views::MenuController* controller = menu()->GetMenuController(); | 507 views::MenuController* controller = menu()->GetMenuController(); |
506 ASSERT_TRUE(controller); | 508 ASSERT_TRUE(controller); |
507 EXPECT_TRUE(controller->IsCancelAllTimerRunningForTest()); | 509 EXPECT_TRUE(controller->IsCancelAllTimerRunningForTest()); |
508 | 510 |
509 Done(); | 511 Done(); |
510 } | 512 } |
511 | 513 |
512 // Test that if a menu is opened for a drop handled entirely by menu code, the | 514 // Test that if a menu is opened for a drop handled entirely by menu code, the |
513 // menu will try to close if it does not receive any drag updates. | 515 // menu will try to close if it does not receive any drag updates. |
514 VIEW_TEST(MenuViewDragAndDropForDropCancel, MenuViewCancelsForOwnDrag) | 516 VIEW_TEST(MenuViewDragAndDropForDropCancel, MenuViewCancelsForOwnDrag) |
OLD | NEW |