| 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/location.h" | 8 #include "base/location.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 views::MenuController::TurnOffMenuSelectionHoldForTest(); | 285 views::MenuController::TurnOffMenuSelectionHoldForTest(); |
| 286 BookmarkBarView::DisableAnimationsForTesting(true); | 286 BookmarkBarView::DisableAnimationsForTesting(true); |
| 287 SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient()); | 287 SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient()); |
| 288 | 288 |
| 289 profile_.reset(new TestingProfile()); | 289 profile_.reset(new TestingProfile()); |
| 290 profile_->CreateBookmarkModel(true); | 290 profile_->CreateBookmarkModel(true); |
| 291 model_ = BookmarkModelFactory::GetForBrowserContext(profile_.get()); | 291 model_ = BookmarkModelFactory::GetForBrowserContext(profile_.get()); |
| 292 bookmarks::test::WaitForBookmarkModelToLoad(model_); | 292 bookmarks::test::WaitForBookmarkModelToLoad(model_); |
| 293 profile_->GetPrefs()->SetBoolean(bookmarks::prefs::kShowBookmarkBar, true); | 293 profile_->GetPrefs()->SetBoolean(bookmarks::prefs::kShowBookmarkBar, true); |
| 294 | 294 |
| 295 Browser::CreateParams native_params(profile_.get()); | 295 Browser::CreateParams native_params(profile_.get(), true); |
| 296 browser_ = chrome::CreateBrowserWithTestWindowForParams(&native_params); | 296 browser_ = chrome::CreateBrowserWithTestWindowForParams(&native_params); |
| 297 | 297 |
| 298 local_state_.reset(new ScopedTestingLocalState( | 298 local_state_.reset(new ScopedTestingLocalState( |
| 299 TestingBrowserProcess::GetGlobal())); | 299 TestingBrowserProcess::GetGlobal())); |
| 300 model_->ClearStore(); | 300 model_->ClearStore(); |
| 301 | 301 |
| 302 bb_view_.reset(new BookmarkBarView(browser_.get(), NULL)); | 302 bb_view_.reset(new BookmarkBarView(browser_.get(), NULL)); |
| 303 bb_view_->set_owned_by_client(); | 303 bb_view_->set_owned_by_client(); |
| 304 // Real bookmark bars get a BookmarkBarViewBackground. Set an opaque | 304 // Real bookmark bars get a BookmarkBarViewBackground. Set an opaque |
| 305 // background here just to avoid triggering subpixel rendering issues. | 305 // background here just to avoid triggering subpixel rendering issues. |
| (...skipping 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2377 ASSERT_EQ(2u, navigator_.urls().size()); | 2377 ASSERT_EQ(2u, navigator_.urls().size()); |
| 2378 EXPECT_EQ(navigator_.urls()[0], | 2378 EXPECT_EQ(navigator_.urls()[0], |
| 2379 model_->bookmark_bar_node()->GetChild(0)->GetChild(0)->url()); | 2379 model_->bookmark_bar_node()->GetChild(0)->GetChild(0)->url()); |
| 2380 EXPECT_EQ(navigator_.urls()[1], | 2380 EXPECT_EQ(navigator_.urls()[1], |
| 2381 model_->bookmark_bar_node()->GetChild(0)->GetChild(2)->url()); | 2381 model_->bookmark_bar_node()->GetChild(0)->GetChild(2)->url()); |
| 2382 Done(); | 2382 Done(); |
| 2383 } | 2383 } |
| 2384 }; | 2384 }; |
| 2385 | 2385 |
| 2386 VIEW_TEST(BookmarkBarViewTest27, MiddleClickOnFolderOpensAllBookmarks); | 2386 VIEW_TEST(BookmarkBarViewTest27, MiddleClickOnFolderOpensAllBookmarks); |
| OLD | NEW |