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

Side by Side Diff: chrome/browser/bookmarks/bookmark_node_data_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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/bookmarks/bookmark_model.h" 9 #include "chrome/browser/bookmarks/bookmark_model.h"
10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
11 #include "chrome/browser/bookmarks/bookmark_node_data.h" 11 #include "chrome/browser/bookmarks/bookmark_node_data.h"
12 #include "chrome/test/base/testing_profile.h" 12 #include "chrome/test/base/testing_profile.h"
13 #include "chrome/test/base/ui_test_utils.h" 13 #include "chrome/test/base/ui_test_utils.h"
14 #include "content/public/test/test_browser_thread.h" 14 #include "content/public/test/test_browser_thread.h"
15 #include "googleurl/src/gurl.h" 15 #include "googleurl/src/gurl.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 #include "ui/base/dragdrop/os_exchange_data.h" 17 #include "ui/base/dragdrop/os_exchange_data.h"
18 #include "ui/base/dragdrop/os_exchange_data_provider_win.h" 18 #include "ui/base/dragdrop/os_exchange_data_provider_win.h"
19 19
20 using content::BrowserThread; 20 using content::BrowserThread;
21 21
22 class BookmarkNodeDataTest : public testing::Test { 22 class BookmarkNodeDataTest : public testing::Test {
23 public: 23 public:
24 BookmarkNodeDataTest() 24 BookmarkNodeDataTest()
25 : ui_thread_(BrowserThread::UI, &loop_), 25 : ui_thread_(BrowserThread::UI, &loop_),
26 file_thread_(BrowserThread::FILE, &loop_) { 26 file_thread_(BrowserThread::FILE, &loop_) {
27 } 27 }
28 28
29 private: 29 private:
30 MessageLoop loop_; 30 base::MessageLoop loop_;
31 content::TestBrowserThread ui_thread_; 31 content::TestBrowserThread ui_thread_;
32 content::TestBrowserThread file_thread_; 32 content::TestBrowserThread file_thread_;
33 }; 33 };
34 34
35 namespace { 35 namespace {
36 36
37 ui::OSExchangeData::Provider* CloneProvider(const ui::OSExchangeData& data) { 37 ui::OSExchangeData::Provider* CloneProvider(const ui::OSExchangeData& data) {
38 return new ui::OSExchangeDataProviderWin( 38 return new ui::OSExchangeDataProviderWin(
39 ui::OSExchangeDataProviderWin::GetIDataObject(data)); 39 ui::OSExchangeDataProviderWin::GetIDataObject(data));
40 } 40 }
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 // And make sure we get the node back. 245 // And make sure we get the node back.
246 std::vector<const BookmarkNode*> read_nodes = read_data.GetNodes(&profile); 246 std::vector<const BookmarkNode*> read_nodes = read_data.GetNodes(&profile);
247 ASSERT_EQ(2, read_nodes.size()); 247 ASSERT_EQ(2, read_nodes.size());
248 EXPECT_TRUE(read_nodes[0] == folder); 248 EXPECT_TRUE(read_nodes[0] == folder);
249 EXPECT_TRUE(read_nodes[1] == url_node); 249 EXPECT_TRUE(read_nodes[1] == url_node);
250 250
251 // Asking for the first node should return NULL with more than one element 251 // Asking for the first node should return NULL with more than one element
252 // present. 252 // present.
253 EXPECT_TRUE(read_data.GetFirstNode(&profile) == NULL); 253 EXPECT_TRUE(read_data.GetFirstNode(&profile) == NULL);
254 } 254 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model_unittest.cc ('k') | chrome/browser/bookmarks/bookmark_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698