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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 views::MenuController::TurnOffContextMenuSelectionHoldForTest(); | 120 views::MenuController::TurnOffContextMenuSelectionHoldForTest(); |
121 BookmarkBarView::DisableAnimationsForTesting(true); | 121 BookmarkBarView::DisableAnimationsForTesting(true); |
122 | 122 |
123 profile_.reset(new TestingProfile()); | 123 profile_.reset(new TestingProfile()); |
124 profile_->CreateBookmarkModel(true); | 124 profile_->CreateBookmarkModel(true); |
125 model_ = BookmarkModelFactory::GetForProfile(profile_.get()); | 125 model_ = BookmarkModelFactory::GetForProfile(profile_.get()); |
126 ui_test_utils::WaitForBookmarkModelToLoad(model_); | 126 ui_test_utils::WaitForBookmarkModelToLoad(model_); |
127 profile_->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, true); | 127 profile_->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, true); |
128 | 128 |
129 Browser::CreateParams native_params(profile_.get(), | 129 Browser::CreateParams native_params(profile_.get(), |
130 chrome::HOST_DESKTOP_TYPE_NATIVE); | 130 chrome::GetActiveDesktop()); |
131 browser_.reset( | 131 browser_.reset( |
132 chrome::CreateBrowserWithTestWindowForParams(&native_params)); | 132 chrome::CreateBrowserWithTestWindowForParams(&native_params)); |
133 | 133 |
134 local_state_.reset(new ScopedTestingLocalState( | 134 local_state_.reset(new ScopedTestingLocalState( |
135 TestingBrowserProcess::GetGlobal())); | 135 TestingBrowserProcess::GetGlobal())); |
136 model_->ClearStore(); | 136 model_->ClearStore(); |
137 | 137 |
138 bb_view_.reset(new BookmarkBarView(browser_.get(), NULL)); | 138 bb_view_.reset(new BookmarkBarView(browser_.get(), NULL)); |
139 bb_view_->set_owned_by_client(); | 139 bb_view_->set_owned_by_client(); |
140 bb_view_->SetPageNavigator(&navigator_); | 140 bb_view_->SetPageNavigator(&navigator_); |
(...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1776 EXPECT_TRUE(bb_view_->GetContextMenu() == NULL); | 1776 EXPECT_TRUE(bb_view_->GetContextMenu() == NULL); |
1777 EXPECT_TRUE(bb_view_->GetMenu() == NULL); | 1777 EXPECT_TRUE(bb_view_->GetMenu() == NULL); |
1778 | 1778 |
1779 Done(); | 1779 Done(); |
1780 } | 1780 } |
1781 | 1781 |
1782 ContextMenuNotificationObserver observer_; | 1782 ContextMenuNotificationObserver observer_; |
1783 }; | 1783 }; |
1784 | 1784 |
1785 VIEW_TEST(BookmarkBarViewTest21, ContextMenusForEmptyFolder) | 1785 VIEW_TEST(BookmarkBarViewTest21, ContextMenusForEmptyFolder) |
OLD | NEW |