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/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // * if CreateBigMenu returns return true, 100 menu items are created here with | 107 // * if CreateBigMenu returns return true, 100 menu items are created here with |
108 // the names f1-f100. | 108 // the names f1-f100. |
109 // | 109 // |
110 // Subclasses should be sure and invoke super's implementation of SetUp and | 110 // Subclasses should be sure and invoke super's implementation of SetUp and |
111 // TearDown. | 111 // TearDown. |
112 class BookmarkBarViewEventTestBase : public ViewEventTestBase { | 112 class BookmarkBarViewEventTestBase : public ViewEventTestBase { |
113 public: | 113 public: |
114 BookmarkBarViewEventTestBase() | 114 BookmarkBarViewEventTestBase() |
115 : ViewEventTestBase(), | 115 : ViewEventTestBase(), |
116 model_(NULL), | 116 model_(NULL), |
117 bb_view_(NULL), | |
118 file_thread_(BrowserThread::FILE, base::MessageLoop::current()) {} | 117 file_thread_(BrowserThread::FILE, base::MessageLoop::current()) {} |
119 | 118 |
120 virtual void SetUp() OVERRIDE { | 119 virtual void SetUp() OVERRIDE { |
121 views::MenuController::TurnOffContextMenuSelectionHoldForTest(); | 120 views::MenuController::TurnOffContextMenuSelectionHoldForTest(); |
122 BookmarkBarView::DisableAnimationsForTesting(true); | 121 BookmarkBarView::DisableAnimationsForTesting(true); |
123 | 122 |
124 profile_.reset(new TestingProfile()); | 123 profile_.reset(new TestingProfile()); |
125 profile_->CreateBookmarkModel(true); | 124 profile_->CreateBookmarkModel(true); |
126 model_ = BookmarkModelFactory::GetForProfile(profile_.get()); | 125 model_ = BookmarkModelFactory::GetForProfile(profile_.get()); |
127 ui_test_utils::WaitForBookmarkModelToLoad(model_); | 126 ui_test_utils::WaitForBookmarkModelToLoad(model_); |
(...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1777 EXPECT_TRUE(bb_view_->GetContextMenu() == NULL); | 1776 EXPECT_TRUE(bb_view_->GetContextMenu() == NULL); |
1778 EXPECT_TRUE(bb_view_->GetMenu() == NULL); | 1777 EXPECT_TRUE(bb_view_->GetMenu() == NULL); |
1779 | 1778 |
1780 Done(); | 1779 Done(); |
1781 } | 1780 } |
1782 | 1781 |
1783 ContextMenuNotificationObserver observer_; | 1782 ContextMenuNotificationObserver observer_; |
1784 }; | 1783 }; |
1785 | 1784 |
1786 VIEW_TEST(BookmarkBarViewTest21, ContextMenusForEmptyFolder) | 1785 VIEW_TEST(BookmarkBarViewTest21, ContextMenusForEmptyFolder) |
OLD | NEW |