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

Side by Side Diff: chrome/browser/ui/webui/ntp/android/partner_bookmarks_shim_unittest.cc

Issue 14307023: chrome: Use base::MessageLoop. (Part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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/ui/webui/ntp/android/partner_bookmarks_shim.h" 5 #include "chrome/browser/ui/webui/ntp/android/partner_bookmarks_shim.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/bookmarks/bookmark_model.h" 10 #include "chrome/browser/bookmarks/bookmark_model.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 ui_test_utils::WaitForBookmarkModelToLoad(model_); 51 ui_test_utils::WaitForBookmarkModelToLoad(model_);
52 } 52 }
53 53
54 virtual void TearDown() OVERRIDE { 54 virtual void TearDown() OVERRIDE {
55 profile_.reset(NULL); 55 profile_.reset(NULL);
56 PartnerBookmarksShim::GetInstance()->Reset(); 56 PartnerBookmarksShim::GetInstance()->Reset();
57 } 57 }
58 58
59 scoped_ptr<TestingProfile> profile_; 59 scoped_ptr<TestingProfile> profile_;
60 60
61 MessageLoopForUI message_loop_; 61 base::MessageLoopForUI message_loop_;
62 content::TestBrowserThread ui_thread_; 62 content::TestBrowserThread ui_thread_;
63 content::TestBrowserThread file_thread_; 63 content::TestBrowserThread file_thread_;
64 64
65 BookmarkModel* model_; 65 BookmarkModel* model_;
66 66
67 DISALLOW_COPY_AND_ASSIGN(PartnerBookmarksShimTest); 67 DISALLOW_COPY_AND_ASSIGN(PartnerBookmarksShimTest);
68 }; 68 };
69 69
70 class TestObserver : public PartnerBookmarksShim::Observer { 70 class TestObserver : public PartnerBookmarksShim::Observer {
71 public: 71 public:
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 root_partner_node->Add(partner_bookmark1, root_partner_node->child_count()); 155 root_partner_node->Add(partner_bookmark1, root_partner_node->child_count());
156 156
157 TestObserver* observer = new TestObserver(); 157 TestObserver* observer = new TestObserver();
158 PartnerBookmarksShim* shim = PartnerBookmarksShim::GetInstance(); 158 PartnerBookmarksShim* shim = PartnerBookmarksShim::GetInstance();
159 shim->AddObserver(observer); 159 shim->AddObserver(observer);
160 shim->AttachTo(model_, model_->bookmark_bar_node()); 160 shim->AttachTo(model_, model_->bookmark_bar_node());
161 ASSERT_FALSE(observer->IsNotifiedOfLoad()); 161 ASSERT_FALSE(observer->IsNotifiedOfLoad());
162 shim->SetPartnerBookmarksRoot(root_partner_node); 162 shim->SetPartnerBookmarksRoot(root_partner_node);
163 ASSERT_TRUE(observer->IsNotifiedOfLoad()); 163 ASSERT_TRUE(observer->IsNotifiedOfLoad());
164 } 164 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/fileicon_source_unittest.cc ('k') | chrome/browser/ui/webui/sync_internals_ui_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698