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