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

Unified Diff: chrome/browser/bookmarks/bookmark_table_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
« no previous file with comments | « chrome/browser/bookmarks/bookmark_storage.cc ('k') | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_table_model_unittest.cc
===================================================================
--- chrome/browser/bookmarks/bookmark_table_model_unittest.cc (revision 30650)
+++ chrome/browser/bookmarks/bookmark_table_model_unittest.cc (working copy)
@@ -3,9 +3,11 @@
// found in the LICENSE file.
#include "app/table_model_observer.h"
+#include "base/message_loop.h"
#include "base/string_util.h"
#include "base/time.h"
#include "chrome/browser/bookmarks/bookmark_table_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"
@@ -32,12 +34,15 @@
changed_count_(0),
item_changed_count_(0),
added_count_(0),
- removed_count_(0) {
+ removed_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.
Time t0 = Time::Now();
const BookmarkNode* bb = bookmark_model()->GetBookmarkBarNode();
@@ -110,6 +115,9 @@
int added_count_;
int removed_count_;
scoped_ptr<TestingProfile> profile_;
+ MessageLoop loop_;
+ ChromeThread ui_thread_;
+ ChromeThread file_thread_;
};
// Verifies the count when showing various nodes.
« no previous file with comments | « chrome/browser/bookmarks/bookmark_storage.cc ('k') | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698