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/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient()); | 267 SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient()); |
268 | 268 |
269 profile_.reset(new TestingProfile()); | 269 profile_.reset(new TestingProfile()); |
270 profile_->CreateBookmarkModel(true); | 270 profile_->CreateBookmarkModel(true); |
271 model_ = BookmarkModelFactory::GetForProfile(profile_.get()); | 271 model_ = BookmarkModelFactory::GetForProfile(profile_.get()); |
272 bookmarks::test::WaitForBookmarkModelToLoad(model_); | 272 bookmarks::test::WaitForBookmarkModelToLoad(model_); |
273 profile_->GetPrefs()->SetBoolean(bookmarks::prefs::kShowBookmarkBar, true); | 273 profile_->GetPrefs()->SetBoolean(bookmarks::prefs::kShowBookmarkBar, true); |
274 | 274 |
275 Browser::CreateParams native_params(profile_.get(), | 275 Browser::CreateParams native_params(profile_.get(), |
276 chrome::GetActiveDesktop()); | 276 chrome::GetActiveDesktop()); |
277 browser_.reset( | 277 browser_ = chrome::CreateBrowserWithTestWindowForParams(&native_params); |
278 chrome::CreateBrowserWithTestWindowForParams(&native_params)); | |
279 | 278 |
280 local_state_.reset(new ScopedTestingLocalState( | 279 local_state_.reset(new ScopedTestingLocalState( |
281 TestingBrowserProcess::GetGlobal())); | 280 TestingBrowserProcess::GetGlobal())); |
282 model_->ClearStore(); | 281 model_->ClearStore(); |
283 | 282 |
284 bb_view_.reset(new BookmarkBarView(browser_.get(), NULL)); | 283 bb_view_.reset(new BookmarkBarView(browser_.get(), NULL)); |
285 bb_view_->set_owned_by_client(); | 284 bb_view_->set_owned_by_client(); |
286 bb_view_->SetPageNavigator(&navigator_); | 285 bb_view_->SetPageNavigator(&navigator_); |
287 | 286 |
288 AddTestData(CreateBigMenu()); | 287 AddTestData(CreateBigMenu()); |
(...skipping 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2064 }; | 2063 }; |
2065 | 2064 |
2066 #if defined(OS_WIN) | 2065 #if defined(OS_WIN) |
2067 // This test times out on Windows. TODO(pkotwicz): Find out why. | 2066 // This test times out on Windows. TODO(pkotwicz): Find out why. |
2068 #define MAYBE_CloseSourceBrowserDuringDrag DISABLED_CloseSourceBrowserDuringDrag | 2067 #define MAYBE_CloseSourceBrowserDuringDrag DISABLED_CloseSourceBrowserDuringDrag |
2069 #else | 2068 #else |
2070 #define MAYBE_CloseSourceBrowserDuringDrag CloseSourceBrowserDuringDrag | 2069 #define MAYBE_CloseSourceBrowserDuringDrag CloseSourceBrowserDuringDrag |
2071 #endif | 2070 #endif |
2072 | 2071 |
2073 VIEW_TEST(BookmarkBarViewTest22, MAYBE_CloseSourceBrowserDuringDrag) | 2072 VIEW_TEST(BookmarkBarViewTest22, MAYBE_CloseSourceBrowserDuringDrag) |
OLD | NEW |