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

Side by Side Diff: chrome/browser/bookmarks/bookmark_model_unittest.cc

Issue 27262: Wires up sorting of bookmarks to the 'organize menu' in the bookmark... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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) 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/bookmarks/bookmark_model.h" 6 #include "chrome/browser/bookmarks/bookmark_model.h"
7 #include "chrome/browser/bookmarks/bookmark_codec.h" 7 #include "chrome/browser/bookmarks/bookmark_codec.h"
8 #include "chrome/browser/bookmarks/bookmark_utils.h" 8 #include "chrome/browser/bookmarks/bookmark_utils.h"
9 #include "chrome/common/chrome_constants.h" 9 #include "chrome/common/chrome_constants.h"
10 #include "chrome/common/chrome_paths.h" 10 #include "chrome/common/chrome_paths.h"
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 BookmarkNode* new_parent, 649 BookmarkNode* new_parent,
650 int new_index) {} 650 int new_index) {}
651 virtual void BookmarkNodeAdded(BookmarkModel* model, 651 virtual void BookmarkNodeAdded(BookmarkModel* model,
652 BookmarkNode* parent, 652 BookmarkNode* parent,
653 int index) {} 653 int index) {}
654 virtual void BookmarkNodeRemoved(BookmarkModel* model, 654 virtual void BookmarkNodeRemoved(BookmarkModel* model,
655 BookmarkNode* parent, 655 BookmarkNode* parent,
656 int index) {} 656 int index) {}
657 virtual void BookmarkNodeChanged(BookmarkModel* model, 657 virtual void BookmarkNodeChanged(BookmarkModel* model,
658 BookmarkNode* node) {} 658 BookmarkNode* node) {}
659 virtual void BookmarkNodeChildrenReordered(BookmarkModel* model,
660 BookmarkNode* node) {}
659 virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model, 661 virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model,
660 BookmarkNode* node) {} 662 BookmarkNode* node) {}
661 663
662 MessageLoopForUI message_loop_; 664 MessageLoopForUI message_loop_;
663 }; 665 };
664 666
665 // Creates a set of nodes in the bookmark bar model, then recreates the 667 // Creates a set of nodes in the bookmark bar model, then recreates the
666 // bookmark bar model which triggers loading from the db and checks the loaded 668 // bookmark bar model which triggers loading from the db and checks the loaded
667 // structure to make sure it is what we first created. 669 // structure to make sure it is what we first created.
668 TEST_F(BookmarkModelTestWithProfile, CreateAndRestore) { 670 TEST_F(BookmarkModelTestWithProfile, CreateAndRestore) {
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 854
853 // Make sure we were notified. 855 // Make sure we were notified.
854 AssertObserverCount(0, 0, 0, 0, 1); 856 AssertObserverCount(0, 0, 0, 0, 1);
855 857
856 // Make sure the order matches. 858 // Make sure the order matches.
857 EXPECT_TRUE(parent->GetChild(0)->GetTitle() == L"a"); 859 EXPECT_TRUE(parent->GetChild(0)->GetTitle() == L"a");
858 EXPECT_TRUE(parent->GetChild(1)->GetTitle() == L"B"); 860 EXPECT_TRUE(parent->GetChild(1)->GetTitle() == L"B");
859 EXPECT_TRUE(parent->GetChild(2)->GetTitle() == L"C"); 861 EXPECT_TRUE(parent->GetChild(2)->GetTitle() == L"C");
860 EXPECT_TRUE(parent->GetChild(3)->GetTitle() == L"d"); 862 EXPECT_TRUE(parent->GetChild(3)->GetTitle() == L"d");
861 } 863 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698