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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 content::SetContentClient(content_client_.get()); | 281 content::SetContentClient(content_client_.get()); |
282 browser_content_client_.reset(new ChromeContentBrowserClient()); | 282 browser_content_client_.reset(new ChromeContentBrowserClient()); |
283 content::SetBrowserClientForTesting(browser_content_client_.get()); | 283 content::SetBrowserClientForTesting(browser_content_client_.get()); |
284 | 284 |
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::GetForProfile(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()); |
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 |
(...skipping 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2373 ASSERT_EQ(2u, navigator_.urls().size()); | 2373 ASSERT_EQ(2u, navigator_.urls().size()); |
2374 EXPECT_EQ(navigator_.urls()[0], | 2374 EXPECT_EQ(navigator_.urls()[0], |
2375 model_->bookmark_bar_node()->GetChild(0)->GetChild(0)->url()); | 2375 model_->bookmark_bar_node()->GetChild(0)->GetChild(0)->url()); |
2376 EXPECT_EQ(navigator_.urls()[1], | 2376 EXPECT_EQ(navigator_.urls()[1], |
2377 model_->bookmark_bar_node()->GetChild(0)->GetChild(2)->url()); | 2377 model_->bookmark_bar_node()->GetChild(0)->GetChild(2)->url()); |
2378 Done(); | 2378 Done(); |
2379 } | 2379 } |
2380 }; | 2380 }; |
2381 | 2381 |
2382 VIEW_TEST(BookmarkBarViewTest27, MiddleClickOnFolderOpensAllBookmarks); | 2382 VIEW_TEST(BookmarkBarViewTest27, MiddleClickOnFolderOpensAllBookmarks); |
OLD | NEW |