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

Unified Diff: chrome/browser/bookmarks/bookmark_folder_tree_model_unittest.cc

Issue 342068: Third patch in getting rid of caching MessageLoop pointers and always using C... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/bookmarks/bookmark_folder_tree_model_unittest.cc
===================================================================
--- chrome/browser/bookmarks/bookmark_folder_tree_model_unittest.cc (revision 30650)
+++ chrome/browser/bookmarks/bookmark_folder_tree_model_unittest.cc (working copy)
@@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/message_loop.h"
#include "base/string_util.h"
#include "chrome/browser/bookmarks/bookmark_folder_tree_model.h"
+#include "chrome/browser/chrome_thread.h"
#include "chrome/test/testing_profile.h"
#include "grit/generated_resources.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -31,12 +33,15 @@
added_count_(0),
removed_count_(0),
changed_count_(0),
- reordered_count_(0) {
+ reordered_count_(0),
+ ui_thread_(ChromeThread::UI, &loop_),
+ file_thread_(ChromeThread::FILE, &loop_) {
}
virtual void SetUp() {
profile_.reset(new TestingProfile());
profile_->CreateBookmarkModel(true);
+ profile_->BlockUntilBookmarkModelLoaded();
// Populate with some default data.
const BookmarkNode* bb = bookmark_model()->GetBookmarkBarNode();
bookmark_model()->AddURL(bb, 0, L"url1", url1_);
@@ -112,6 +117,9 @@
int removed_count_;
int reordered_count_;
scoped_ptr<TestingProfile> profile_;
+ MessageLoop loop_;
+ ChromeThread ui_thread_;
+ ChromeThread file_thread_;
};
// Verifies the root node has 4 nodes, and the contents of the bookmark bar
« no previous file with comments | « chrome/browser/bookmarks/bookmark_drag_data_unittest.cc ('k') | chrome/browser/bookmarks/bookmark_html_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698