Chromium Code Reviews

Side by Side Diff: chrome/browser/ui/views/menu_view_drag_and_drop_test.cc

Issue 638653003: Make ui::Compositor use ui::Scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase with enable mode patch since that would probably go in before this Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
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"
11 #include "ui/views/controls/menu/menu_item_view.h" 11 #include "ui/views/controls/menu/menu_item_view.h"
12 #include "ui/views/controls/menu/menu_runner.h" 12 #include "ui/views/controls/menu/menu_runner.h"
13 #include "ui/views/controls/menu/submenu_view.h" 13 #include "ui/views/controls/menu/submenu_view.h"
14 #include "ui/views/view.h" 14 #include "ui/views/view.h"
15 15
16 namespace { 16 namespace {
17 17
18 // Borrowed from chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc, 18 // Borrowed from chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc,
19 // since these are also disabled on Linux for drag and drop. 19 // since these are also disabled on Linux for drag and drop.
20 // TODO(erg): Fix DND tests on linux_aura. crbug.com/163931 20 // TODO(erg): Fix DND tests on linux_aura. http://crbug.com/163931
21 #if defined(OS_LINUX) && defined(USE_AURA) 21 // TODO(enne): Windows version has flaky timeouts. http://crbug.com/401226
22 #if defined(USE_AURA)
22 #define MAYBE(x) DISABLED_##x 23 #define MAYBE(x) DISABLED_##x
23 #else 24 #else
24 #define MAYBE(x) x 25 #define MAYBE(x) x
25 #endif 26 #endif
26 27
27 const char kTestNestedDragData[] = "test_nested_drag_data"; 28 const char kTestNestedDragData[] = "test_nested_drag_data";
28 const char kTestTopLevelDragData[] = "test_top_level_drag_data"; 29 const char kTestTopLevelDragData[] = "test_top_level_drag_data";
29 30
30 // A simple view which can be dragged. 31 // A simple view which can be dragged.
31 class TestDragView : public views::View { 32 class TestDragView : public views::View {
(...skipping 477 matching lines...)
509 views::MenuController* controller = menu()->GetMenuController(); 510 views::MenuController* controller = menu()->GetMenuController();
510 ASSERT_TRUE(controller); 511 ASSERT_TRUE(controller);
511 EXPECT_TRUE(controller->IsCancelAllTimerRunningForTest()); 512 EXPECT_TRUE(controller->IsCancelAllTimerRunningForTest());
512 513
513 Done(); 514 Done();
514 } 515 }
515 516
516 // Test that if a menu is opened for a drop handled entirely by menu code, the 517 // Test that if a menu is opened for a drop handled entirely by menu code, the
517 // menu will try to close if it does not receive any drag updates. 518 // menu will try to close if it does not receive any drag updates.
518 VIEW_TEST(MenuViewDragAndDropForDropCancel, MenuViewCancelsForOwnDrag) 519 VIEW_TEST(MenuViewDragAndDropForDropCancel, MenuViewCancelsForOwnDrag)
OLDNEW

Powered by Google App Engine