OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_node_data.h" | 10 #include "chrome/browser/bookmarks/bookmark_node_data.h" |
| 11 #include "chrome/test/base/testing_browser_process_test.h" |
11 #include "chrome/test/base/testing_profile.h" | 12 #include "chrome/test/base/testing_profile.h" |
12 #include "chrome/test/testing_browser_process_test.h" | |
13 #include "content/browser/browser_thread.h" | 13 #include "content/browser/browser_thread.h" |
14 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "ui/base/dragdrop/os_exchange_data.h" | 16 #include "ui/base/dragdrop/os_exchange_data.h" |
17 #include "ui/base/dragdrop/os_exchange_data_provider_win.h" | 17 #include "ui/base/dragdrop/os_exchange_data_provider_win.h" |
18 | 18 |
19 class BookmarkNodeDataTest : public TestingBrowserProcessTest { | 19 class BookmarkNodeDataTest : public TestingBrowserProcessTest { |
20 public: | 20 public: |
21 BookmarkNodeDataTest() | 21 BookmarkNodeDataTest() |
22 : ui_thread_(BrowserThread::UI, &loop_), | 22 : ui_thread_(BrowserThread::UI, &loop_), |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 // And make sure we get the node back. | 235 // And make sure we get the node back. |
236 std::vector<const BookmarkNode*> read_nodes = read_data.GetNodes(&profile); | 236 std::vector<const BookmarkNode*> read_nodes = read_data.GetNodes(&profile); |
237 ASSERT_EQ(2, read_nodes.size()); | 237 ASSERT_EQ(2, read_nodes.size()); |
238 EXPECT_TRUE(read_nodes[0] == folder); | 238 EXPECT_TRUE(read_nodes[0] == folder); |
239 EXPECT_TRUE(read_nodes[1] == url_node); | 239 EXPECT_TRUE(read_nodes[1] == url_node); |
240 | 240 |
241 // Asking for the first node should return NULL with more than one element | 241 // Asking for the first node should return NULL with more than one element |
242 // present. | 242 // present. |
243 EXPECT_TRUE(read_data.GetFirstNode(&profile) == NULL); | 243 EXPECT_TRUE(read_data.GetFirstNode(&profile) == NULL); |
244 } | 244 } |
OLD | NEW |