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

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

Issue 16174003: Make all tests use GetActiveDesktop() instead of hardcoding HOST_DESKTOP_TYPE_NATIVE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/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
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
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)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698