Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc

Issue 12529012: Context menu on views must show on mouse down for non-WIN. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 class BookmarkBarViewEventTestBase : public ViewEventTestBase { 105 class BookmarkBarViewEventTestBase : public ViewEventTestBase {
106 public: 106 public:
107 BookmarkBarViewEventTestBase() 107 BookmarkBarViewEventTestBase()
108 : ViewEventTestBase(), 108 : ViewEventTestBase(),
109 model_(NULL), 109 model_(NULL),
110 bb_view_(NULL), 110 bb_view_(NULL),
111 file_thread_(BrowserThread::FILE, MessageLoop::current()) { 111 file_thread_(BrowserThread::FILE, MessageLoop::current()) {
112 } 112 }
113 113
114 virtual void SetUp() OVERRIDE { 114 virtual void SetUp() OVERRIDE {
115 views::MenuController::TurnOffContextMenuSelectionHoldForTest();
115 BookmarkBarView::DisableAnimationsForTesting(true); 116 BookmarkBarView::DisableAnimationsForTesting(true);
116 117
117 profile_.reset(new TestingProfile()); 118 profile_.reset(new TestingProfile());
118 profile_->CreateBookmarkModel(true); 119 profile_->CreateBookmarkModel(true);
119 model_ = BookmarkModelFactory::GetForProfile(profile_.get()); 120 model_ = BookmarkModelFactory::GetForProfile(profile_.get());
120 ui_test_utils::WaitForBookmarkModelToLoad(model_); 121 ui_test_utils::WaitForBookmarkModelToLoad(model_);
121 profile_->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, true); 122 profile_->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, true);
122 123
123 Browser::CreateParams native_params(profile_.get(), 124 Browser::CreateParams native_params(profile_.get(),
124 chrome::HOST_DESKTOP_TYPE_NATIVE); 125 chrome::HOST_DESKTOP_TYPE_NATIVE);
(...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after
1774 EXPECT_TRUE(bb_view_->GetContextMenu() == NULL); 1775 EXPECT_TRUE(bb_view_->GetContextMenu() == NULL);
1775 EXPECT_TRUE(bb_view_->GetMenu() == NULL); 1776 EXPECT_TRUE(bb_view_->GetMenu() == NULL);
1776 1777
1777 Done(); 1778 Done();
1778 } 1779 }
1779 1780
1780 ContextMenuNotificationObserver observer_; 1781 ContextMenuNotificationObserver observer_;
1781 }; 1782 };
1782 1783
1783 VIEW_TEST(BookmarkBarViewTest21, ContextMenusForEmptyFolder) 1784 VIEW_TEST(BookmarkBarViewTest21, ContextMenusForEmptyFolder)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/browser_action_view.cc » ('j') | ui/views/controls/menu/menu_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698