| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "app/os_exchange_data.h" |
| 5 #include "base/scoped_ptr.h" | 6 #include "base/scoped_ptr.h" |
| 6 #include "chrome/browser/bookmarks/bookmark_drag_data.h" | 7 #include "chrome/browser/bookmarks/bookmark_drag_data.h" |
| 7 #include "chrome/browser/bookmarks/bookmark_model.h" | 8 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 8 #include "chrome/common/os_exchange_data.h" | |
| 9 #include "chrome/test/testing_profile.h" | 9 #include "chrome/test/testing_profile.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 typedef testing::Test BookmarkDragDataTest; | 13 typedef testing::Test BookmarkDragDataTest; |
| 14 | 14 |
| 15 // Makes sure BookmarkDragData is initially invalid. | 15 // Makes sure BookmarkDragData is initially invalid. |
| 16 TEST_F(BookmarkDragDataTest, InitialState) { | 16 TEST_F(BookmarkDragDataTest, InitialState) { |
| 17 BookmarkDragData data; | 17 BookmarkDragData data; |
| 18 EXPECT_FALSE(data.is_valid()); | 18 EXPECT_FALSE(data.is_valid()); |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 // And make sure we get the node back. | 206 // And make sure we get the node back. |
| 207 std::vector<BookmarkNode*> read_nodes = read_data.GetNodes(&profile); | 207 std::vector<BookmarkNode*> read_nodes = read_data.GetNodes(&profile); |
| 208 ASSERT_EQ(2, read_nodes.size()); | 208 ASSERT_EQ(2, read_nodes.size()); |
| 209 EXPECT_TRUE(read_nodes[0] == group); | 209 EXPECT_TRUE(read_nodes[0] == group); |
| 210 EXPECT_TRUE(read_nodes[1] == url_node); | 210 EXPECT_TRUE(read_nodes[1] == url_node); |
| 211 | 211 |
| 212 // Asking for the first node should return NULL with more than one element | 212 // Asking for the first node should return NULL with more than one element |
| 213 // present. | 213 // present. |
| 214 EXPECT_TRUE(read_data.GetFirstNode(&profile) == NULL); | 214 EXPECT_TRUE(read_data.GetFirstNode(&profile) == NULL); |
| 215 } | 215 } |
| OLD | NEW |