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/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 Loading... |
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 Loading... |
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) |
OLD | NEW |