OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <set> | 5 #include <set> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 TEST_F(BookmarkModelTestWithProfile2, RemoveNotification) { | 966 TEST_F(BookmarkModelTestWithProfile2, RemoveNotification) { |
967 profile_->CreateHistoryService(false, false); | 967 profile_->CreateHistoryService(false, false); |
968 profile_->CreateBookmarkModel(true); | 968 profile_->CreateBookmarkModel(true); |
969 BlockTillBookmarkModelLoaded(); | 969 BlockTillBookmarkModelLoaded(); |
970 | 970 |
971 // Add a URL. | 971 // Add a URL. |
972 GURL url("http://www.google.com"); | 972 GURL url("http://www.google.com"); |
973 bookmark_utils::AddIfNotBookmarked(bb_model_, url, string16()); | 973 bookmark_utils::AddIfNotBookmarked(bb_model_, url, string16()); |
974 | 974 |
975 profile_->GetHistoryService(Profile::EXPLICIT_ACCESS)->AddPage( | 975 profile_->GetHistoryService(Profile::EXPLICIT_ACCESS)->AddPage( |
976 url, NULL, 1, GURL(), PageTransition::TYPED, | 976 url, NULL, 1, GURL(), content::PAGE_TRANSITION_TYPED, |
977 history::RedirectList(), history::SOURCE_BROWSED, false); | 977 history::RedirectList(), history::SOURCE_BROWSED, false); |
978 | 978 |
979 // This won't actually delete the URL, rather it'll empty out the visits. | 979 // This won't actually delete the URL, rather it'll empty out the visits. |
980 // This triggers blocking on the BookmarkModel. | 980 // This triggers blocking on the BookmarkModel. |
981 profile_->GetHistoryService(Profile::EXPLICIT_ACCESS)->DeleteURL(url); | 981 profile_->GetHistoryService(Profile::EXPLICIT_ACCESS)->DeleteURL(url); |
982 } | 982 } |
983 | 983 |
984 TEST_F(BookmarkModelTest, Sort) { | 984 TEST_F(BookmarkModelTest, Sort) { |
985 // Populate the bookmark bar node with nodes for 'B', 'a', 'd' and 'C'. | 985 // Populate the bookmark bar node with nodes for 'B', 'a', 'd' and 'C'. |
986 // 'C' and 'a' are folders. | 986 // 'C' and 'a' are folders. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 TEST_F(BookmarkModelTest, SyncNodeVisibileWithChildren) { | 1035 TEST_F(BookmarkModelTest, SyncNodeVisibileWithChildren) { |
1036 const BookmarkNode* root = model_.synced_node(); | 1036 const BookmarkNode* root = model_.synced_node(); |
1037 const string16 title(ASCIIToUTF16("foo")); | 1037 const string16 title(ASCIIToUTF16("foo")); |
1038 const GURL url("http://foo.com"); | 1038 const GURL url("http://foo.com"); |
1039 | 1039 |
1040 model_.AddURL(root, 0, title, url); | 1040 model_.AddURL(root, 0, title, url); |
1041 EXPECT_TRUE(model_.synced_node()->IsVisible()); | 1041 EXPECT_TRUE(model_.synced_node()->IsVisible()); |
1042 } | 1042 } |
1043 | 1043 |
1044 } // namespace | 1044 } // namespace |
OLD | NEW |