| 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/location.h" | 8 #include "base/location.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1303 | 1303 |
| 1304 // Tests showing a modal dialog from a context menu. | 1304 // Tests showing a modal dialog from a context menu. |
| 1305 class BookmarkBarViewTest12 : public BookmarkBarViewEventTestBase { | 1305 class BookmarkBarViewTest12 : public BookmarkBarViewEventTestBase { |
| 1306 protected: | 1306 protected: |
| 1307 void DoTestOnMessageLoop() override { | 1307 void DoTestOnMessageLoop() override { |
| 1308 // Open up the other folder. | 1308 // Open up the other folder. |
| 1309 views::LabelButton* button = bb_view_->other_bookmarks_button(); | 1309 views::LabelButton* button = bb_view_->other_bookmarks_button(); |
| 1310 ui_test_utils::MoveMouseToCenterAndPress(button, ui_controls::LEFT, | 1310 ui_test_utils::MoveMouseToCenterAndPress(button, ui_controls::LEFT, |
| 1311 ui_controls::DOWN | ui_controls::UP, | 1311 ui_controls::DOWN | ui_controls::UP, |
| 1312 CreateEventTask(this, &BookmarkBarViewTest12::Step2)); | 1312 CreateEventTask(this, &BookmarkBarViewTest12::Step2)); |
| 1313 chrome::num_bookmark_urls_before_prompting = 1; | 1313 chrome::kNumBookmarkUrlsBeforePrompting = 1; |
| 1314 } | 1314 } |
| 1315 | 1315 |
| 1316 ~BookmarkBarViewTest12() override { | 1316 ~BookmarkBarViewTest12() override { |
| 1317 chrome::num_bookmark_urls_before_prompting = 15; | 1317 chrome::kNumBookmarkUrlsBeforePrompting = 15; |
| 1318 } | 1318 } |
| 1319 | 1319 |
| 1320 private: | 1320 private: |
| 1321 void Step2() { | 1321 void Step2() { |
| 1322 // Menu should be showing. | 1322 // Menu should be showing. |
| 1323 views::MenuItemView* menu = bb_view_->GetMenu(); | 1323 views::MenuItemView* menu = bb_view_->GetMenu(); |
| 1324 ASSERT_TRUE(menu != NULL); | 1324 ASSERT_TRUE(menu != NULL); |
| 1325 ASSERT_TRUE(menu->GetSubmenu()->IsShowing()); | 1325 ASSERT_TRUE(menu->GetSubmenu()->IsShowing()); |
| 1326 | 1326 |
| 1327 views::MenuItemView* child_menu = | 1327 views::MenuItemView* child_menu = |
| (...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2377 ASSERT_EQ(2u, navigator_.urls().size()); | 2377 ASSERT_EQ(2u, navigator_.urls().size()); |
| 2378 EXPECT_EQ(navigator_.urls()[0], | 2378 EXPECT_EQ(navigator_.urls()[0], |
| 2379 model_->bookmark_bar_node()->GetChild(0)->GetChild(0)->url()); | 2379 model_->bookmark_bar_node()->GetChild(0)->GetChild(0)->url()); |
| 2380 EXPECT_EQ(navigator_.urls()[1], | 2380 EXPECT_EQ(navigator_.urls()[1], |
| 2381 model_->bookmark_bar_node()->GetChild(0)->GetChild(2)->url()); | 2381 model_->bookmark_bar_node()->GetChild(0)->GetChild(2)->url()); |
| 2382 Done(); | 2382 Done(); |
| 2383 } | 2383 } |
| 2384 }; | 2384 }; |
| 2385 | 2385 |
| 2386 VIEW_TEST(BookmarkBarViewTest27, MiddleClickOnFolderOpensAllBookmarks); | 2386 VIEW_TEST(BookmarkBarViewTest27, MiddleClickOnFolderOpensAllBookmarks); |
| OLD | NEW |