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

Side by Side Diff: trunk/src/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc

Issue 19714004: Revert 213148 "Add asserts to TestingProfile::CreateHistoryServi..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 5 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) 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 "chrome/browser/bookmarks/bookmark_html_writer.h" 5 #include "chrome/browser/bookmarks/bookmark_html_writer.h"
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/i18n/time_formatting.h" 8 #include "base/i18n/time_formatting.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 DISALLOW_COPY_AND_ASSIGN(BookmarksObserver); 142 DISALLOW_COPY_AND_ASSIGN(BookmarksObserver);
143 }; 143 };
144 144
145 // Tests bookmark_html_writer by populating a BookmarkModel, writing it out by 145 // Tests bookmark_html_writer by populating a BookmarkModel, writing it out by
146 // way of bookmark_html_writer, then using the importer to read it back in. 146 // way of bookmark_html_writer, then using the importer to read it back in.
147 TEST_F(BookmarkHTMLWriterTest, Test) { 147 TEST_F(BookmarkHTMLWriterTest, Test) {
148 content::TestBrowserThreadBundle thread_bundle; 148 content::TestBrowserThreadBundle thread_bundle;
149 149
150 TestingProfile profile; 150 TestingProfile profile;
151 ASSERT_TRUE(profile.CreateHistoryService(true, false)); 151 profile.CreateHistoryService(true, false);
152 profile.BlockUntilHistoryProcessesPendingRequests(); 152 profile.BlockUntilHistoryProcessesPendingRequests();
153 profile.CreateFaviconService(); 153 profile.CreateFaviconService();
154 profile.CreateBookmarkModel(true); 154 profile.CreateBookmarkModel(true);
155 155
156 BookmarkModel* model = BookmarkModelFactory::GetForProfile(&profile); 156 BookmarkModel* model = BookmarkModelFactory::GetForProfile(&profile);
157 ui_test_utils::WaitForBookmarkModelToLoad(model); 157 ui_test_utils::WaitForBookmarkModelToLoad(model);
158 158
159 // Create test PNG representing favicon for url1. 159 // Create test PNG representing favicon for url1.
160 SkBitmap bitmap; 160 SkBitmap bitmap;
161 MakeTestSkBitmap(kIconWidth, kIconHeight, &bitmap); 161 MakeTestSkBitmap(kIconWidth, kIconHeight, &bitmap);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 AssertBookmarkEntryEquals(parsed_bookmarks[5], false, url2, url2_title, t2, 274 AssertBookmarkEntryEquals(parsed_bookmarks[5], false, url2, url2_title, t2,
275 string16(), string16(), string16()); 275 string16(), string16(), string16());
276 AssertBookmarkEntryEquals(parsed_bookmarks[6], false, url1, url1_title, t1, 276 AssertBookmarkEntryEquals(parsed_bookmarks[6], false, url1, url1_title, t1,
277 f3_title, f4_title, string16()); 277 f3_title, f4_title, string16());
278 AssertBookmarkEntryEquals(parsed_bookmarks[7], false, url1, url1_title, t1, 278 AssertBookmarkEntryEquals(parsed_bookmarks[7], false, url1, url1_title, t1,
279 string16(), string16(), string16()); 279 string16(), string16(), string16());
280 AssertBookmarkEntryEquals(parsed_bookmarks[8], false, unnamed_bookmark_url, 280 AssertBookmarkEntryEquals(parsed_bookmarks[8], false, unnamed_bookmark_url,
281 unnamed_bookmark_title, t2, 281 unnamed_bookmark_title, t2,
282 string16(), string16(), string16()); 282 string16(), string16(), string16());
283 } 283 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698