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

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

Issue 3056029: Move the number conversions from string_util to a new file.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/keyboard_codes.h" 5 #include "base/keyboard_codes.h"
6 #include "base/string_util.h" 6 #include "base/string_number_conversions.h"
7 #include "chrome/browser/automation/ui_controls.h" 7 #include "chrome/browser/automation/ui_controls.h"
8 #include "chrome/browser/bookmarks/bookmark_model.h" 8 #include "chrome/browser/bookmarks/bookmark_model.h"
9 #include "chrome/browser/bookmarks/bookmark_utils.h" 9 #include "chrome/browser/bookmarks/bookmark_utils.h"
10 #include "chrome/browser/pref_service.h" 10 #include "chrome/browser/pref_service.h"
11 #include "chrome/browser/profile.h" 11 #include "chrome/browser/profile.h"
12 #include "chrome/browser/tab_contents/page_navigator.h" 12 #include "chrome/browser/tab_contents/page_navigator.h"
13 #include "chrome/browser/views/bookmark_bar_view.h" 13 #include "chrome/browser/views/bookmark_bar_view.h"
14 #include "chrome/common/notification_service.h" 14 #include "chrome/common/notification_service.h"
15 #include "chrome/common/pref_names.h" 15 #include "chrome/common/pref_names.h"
16 #include "chrome/test/testing_profile.h" 16 #include "chrome/test/testing_profile.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 void AddTestData(bool big_menu) { 214 void AddTestData(bool big_menu) {
215 std::string test_base = "file:///c:/tmp/"; 215 std::string test_base = "file:///c:/tmp/";
216 216
217 const BookmarkNode* f1 = model_->AddGroup( 217 const BookmarkNode* f1 = model_->AddGroup(
218 model_->GetBookmarkBarNode(), 0, L"F1"); 218 model_->GetBookmarkBarNode(), 0, L"F1");
219 model_->AddURL(f1, 0, L"f1a", GURL(test_base + "f1a")); 219 model_->AddURL(f1, 0, L"f1a", GURL(test_base + "f1a"));
220 const BookmarkNode* f11 = model_->AddGroup(f1, 1, L"F11"); 220 const BookmarkNode* f11 = model_->AddGroup(f1, 1, L"F11");
221 model_->AddURL(f11, 0, L"f11a", GURL(test_base + "f11a")); 221 model_->AddURL(f11, 0, L"f11a", GURL(test_base + "f11a"));
222 if (big_menu) { 222 if (big_menu) {
223 for (int i = 1; i <= 100; ++i) { 223 for (int i = 1; i <= 100; ++i) {
224 model_->AddURL(f1, i + 1, L"f" + IntToWString(i), 224 model_->AddURL(f1, i + 1, L"f" + UTF8ToWide(base::IntToString(i)),
225 GURL(test_base + "f" + IntToString(i))); 225 GURL(test_base + "f" + base::IntToString(i)));
226 } 226 }
227 } 227 }
228 model_->AddURL(model_->GetBookmarkBarNode(), 1, L"a", 228 model_->AddURL(model_->GetBookmarkBarNode(), 1, L"a",
229 GURL(test_base + "a")); 229 GURL(test_base + "a"));
230 model_->AddURL(model_->GetBookmarkBarNode(), 2, L"b", 230 model_->AddURL(model_->GetBookmarkBarNode(), 2, L"b",
231 GURL(test_base + "b")); 231 GURL(test_base + "b"));
232 model_->AddURL(model_->GetBookmarkBarNode(), 3, L"c", 232 model_->AddURL(model_->GetBookmarkBarNode(), 3, L"c",
233 GURL(test_base + "c")); 233 GURL(test_base + "c"));
234 model_->AddURL(model_->GetBookmarkBarNode(), 4, L"d", 234 model_->AddURL(model_->GetBookmarkBarNode(), 4, L"d",
235 GURL(test_base + "d")); 235 GURL(test_base + "d"));
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 views::TextButton* button = bb_view_->GetBookmarkButton(0); 1338 views::TextButton* button = bb_view_->GetBookmarkButton(0);
1339 ASSERT_TRUE(button->state() == views::CustomButton::BS_PUSHED); 1339 ASSERT_TRUE(button->state() == views::CustomButton::BS_PUSHED);
1340 1340
1341 // Close the window. 1341 // Close the window.
1342 window_->Close(); 1342 window_->Close();
1343 window_ = NULL; 1343 window_ = NULL;
1344 } 1344 }
1345 }; 1345 };
1346 1346
1347 VIEW_TEST(BookmarkBarViewTest16, DeleteMenu) 1347 VIEW_TEST(BookmarkBarViewTest16, DeleteMenu)
OLDNEW
« no previous file with comments | « chrome/browser/views/autofill_profiles_view_win.cc ('k') | chrome/browser/webdata/web_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698