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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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_model.h" 5 #include "chrome/browser/bookmarks/bookmark_model.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 profile_.reset(NULL); 883 profile_.reset(NULL);
884 profile_.reset(new TestingProfile()); 884 profile_.reset(new TestingProfile());
885 profile_->CreateHistoryService(true, false); 885 profile_->CreateHistoryService(true, false);
886 } 886 }
887 887
888 // The profile. 888 // The profile.
889 scoped_ptr<TestingProfile> profile_; 889 scoped_ptr<TestingProfile> profile_;
890 BookmarkModel* bb_model_; 890 BookmarkModel* bb_model_;
891 891
892 private: 892 private:
893 MessageLoopForUI message_loop_; 893 base::MessageLoopForUI message_loop_;
894 content::TestBrowserThread ui_thread_; 894 content::TestBrowserThread ui_thread_;
895 content::TestBrowserThread file_thread_; 895 content::TestBrowserThread file_thread_;
896 }; 896 };
897 897
898 // Creates a set of nodes in the bookmark bar model, then recreates the 898 // Creates a set of nodes in the bookmark bar model, then recreates the
899 // bookmark bar model which triggers loading from the db and checks the loaded 899 // bookmark bar model which triggers loading from the db and checks the loaded
900 // structure to make sure it is what we first created. 900 // structure to make sure it is what we first created.
901 TEST_F(BookmarkModelTestWithProfile, CreateAndRestore) { 901 TEST_F(BookmarkModelTestWithProfile, CreateAndRestore) {
902 struct TestData { 902 struct TestData {
903 // Structure of the children of the bookmark bar model node. 903 // Structure of the children of the bookmark bar model node.
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 1058
1059 EXPECT_TRUE(node.DeleteMetaInfo("key1")); 1059 EXPECT_TRUE(node.DeleteMetaInfo("key1"));
1060 EXPECT_TRUE(node.DeleteMetaInfo("key2")); 1060 EXPECT_TRUE(node.DeleteMetaInfo("key2"));
1061 EXPECT_FALSE(node.DeleteMetaInfo("key3")); 1061 EXPECT_FALSE(node.DeleteMetaInfo("key3"));
1062 EXPECT_FALSE(node.GetMetaInfo("key1", &out_value)); 1062 EXPECT_FALSE(node.GetMetaInfo("key1", &out_value));
1063 EXPECT_FALSE(node.GetMetaInfo("key2", &out_value)); 1063 EXPECT_FALSE(node.GetMetaInfo("key2", &out_value));
1064 EXPECT_TRUE(node.meta_info_str().empty()); 1064 EXPECT_TRUE(node.meta_info_str().empty());
1065 } 1065 }
1066 1066
1067 } // namespace 1067 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_index_unittest.cc ('k') | chrome/browser/bookmarks/bookmark_node_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698