Chromium Code Reviews

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

Issue 14471: Attempt 2 at this. This differs from first version in that I renamed... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/string_util.h" 5 #include "base/string_util.h"
6 #include "chrome/browser/automation/ui_controls.h" 6 #include "chrome/browser/automation/ui_controls.h"
7 #include "chrome/browser/bookmarks/bookmark_model.h" 7 #include "chrome/browser/bookmarks/bookmark_model.h"
8 #include "chrome/browser/bookmarks/bookmark_utils.h" 8 #include "chrome/browser/bookmarks/bookmark_utils.h"
9 #include "chrome/browser/page_navigator.h" 9 #include "chrome/browser/page_navigator.h"
10 #include "chrome/browser/profile.h" 10 #include "chrome/browser/profile.h"
(...skipping 60 matching lines...)
71 virtual void SetUp() { 71 virtual void SetUp() {
72 views::MenuItemView::allow_task_nesting_during_run_ = true; 72 views::MenuItemView::allow_task_nesting_during_run_ = true;
73 BookmarkBarView::testing_ = true; 73 BookmarkBarView::testing_ = true;
74 74
75 profile_.reset(new TestingProfile()); 75 profile_.reset(new TestingProfile());
76 profile_->set_has_history_service(true); 76 profile_->set_has_history_service(true);
77 profile_->CreateBookmarkModel(true); 77 profile_->CreateBookmarkModel(true);
78 profile_->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, true); 78 profile_->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, true);
79 79
80 model_ = profile_->GetBookmarkModel(); 80 model_ = profile_->GetBookmarkModel();
81 model_->ClearStore();
81 82
82 bb_view_ = new BookmarkBarView(profile_.get(), NULL); 83 bb_view_ = new BookmarkBarView(profile_.get(), NULL);
83 bb_view_->SetPageNavigator(&navigator_); 84 bb_view_->SetPageNavigator(&navigator_);
84 85
85 AddTestData(CreateBigMenu()); 86 AddTestData(CreateBigMenu());
86 87
87 // Calculate the preferred size so that one button doesn't fit, which 88 // Calculate the preferred size so that one button doesn't fit, which
88 // triggers the overflow button to appear. 89 // triggers the overflow button to appear.
89 // 90 //
90 // BookmarkBarView::Layout does nothing if the parent is NULL and 91 // BookmarkBarView::Layout does nothing if the parent is NULL and
(...skipping 860 matching lines...)
951 // Do a delayed task to give the dialog time to exit. 952 // Do a delayed task to give the dialog time to exit.
952 MessageLoop::current()->PostTask( 953 MessageLoop::current()->PostTask(
953 FROM_HERE, CreateEventTask(this, &BookmarkBarViewTest12::Step5)); 954 FROM_HERE, CreateEventTask(this, &BookmarkBarViewTest12::Step5));
954 } 955 }
955 956
956 void Step5() { 957 void Step5() {
957 Done(); 958 Done();
958 } 959 }
959 }; 960 };
960 961
961 VIEW_TEST(BookmarkBarViewTest12, CloseWithModalDialog) 962 VIEW_TEST(BookmarkBarViewTest12, DISABLED_CloseWithModalDialog)
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine