| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/callback.h" | 6 #include "base/callback.h" |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 CreateEventTask(this, &BookmarkBarViewTest5::Step4)); | 539 CreateEventTask(this, &BookmarkBarViewTest5::Step4)); |
| 540 | 540 |
| 541 // See comment above this method as to why we do this. | 541 // See comment above this method as to why we do this. |
| 542 ScheduleMouseMoveInBackground(loc.x(), loc.y()); | 542 ScheduleMouseMoveInBackground(loc.x(), loc.y()); |
| 543 } | 543 } |
| 544 | 544 |
| 545 void Step4() { | 545 void Step4() { |
| 546 // Drop the item so that it's now the second item. | 546 // Drop the item so that it's now the second item. |
| 547 views::MenuItemView* target_menu = | 547 views::MenuItemView* target_menu = |
| 548 bb_view_->GetMenu()->GetSubmenu()->GetMenuItemAt(1); | 548 bb_view_->GetMenu()->GetSubmenu()->GetMenuItemAt(1); |
| 549 gfx::Point loc(1, target_menu->height() - 1); | 549 gfx::Point loc(1, target_menu->height() - 2); |
| 550 views::View::ConvertPointToScreen(target_menu, &loc); | 550 views::View::ConvertPointToScreen(target_menu, &loc); |
| 551 ui_controls::SendMouseMove(loc.x(), loc.y()); | 551 ui_controls::SendMouseMove(loc.x(), loc.y()); |
| 552 | 552 |
| 553 ui_controls::SendMouseEventsNotifyWhenDone(ui_controls::LEFT, | 553 ui_controls::SendMouseEventsNotifyWhenDone(ui_controls::LEFT, |
| 554 ui_controls::UP, | 554 ui_controls::UP, |
| 555 CreateEventTask(this, &BookmarkBarViewTest5::Step5)); | 555 CreateEventTask(this, &BookmarkBarViewTest5::Step5)); |
| 556 } | 556 } |
| 557 | 557 |
| 558 void Step5() { | 558 void Step5() { |
| 559 GURL url = model_->bookmark_bar_node()->GetChild(0)->GetChild(1)->url(); | 559 GURL url = model_->bookmark_bar_node()->GetChild(0)->GetChild(1)->url(); |
| (...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1566 ASSERT_TRUE(menu != NULL); | 1566 ASSERT_TRUE(menu != NULL); |
| 1567 ASSERT_TRUE(menu->GetSubmenu()->IsShowing()); | 1567 ASSERT_TRUE(menu->GetSubmenu()->IsShowing()); |
| 1568 | 1568 |
| 1569 menu->GetMenuController()->CancelAll(); | 1569 menu->GetMenuController()->CancelAll(); |
| 1570 | 1570 |
| 1571 Done(); | 1571 Done(); |
| 1572 } | 1572 } |
| 1573 }; | 1573 }; |
| 1574 | 1574 |
| 1575 VIEW_TEST(BookmarkBarViewTest19, BookmarkBarViewTest19_SiblingMenu) | 1575 VIEW_TEST(BookmarkBarViewTest19, BookmarkBarViewTest19_SiblingMenu) |
| OLD | NEW |