OLD | NEW |
| (Empty) |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "app/gtk_dnd_util.h" | |
6 #include "chrome/browser/gtk/bookmark_utils_gtk.h" | |
7 #include "testing/gtest/include/gtest/gtest.h" | |
8 | |
9 TEST(BookmarkUtilsGtkTest, GetNodesFromSelectionInvalid) { | |
10 std::vector<const BookmarkNode*> nodes; | |
11 nodes = bookmark_utils::GetNodesFromSelection(NULL, NULL, 0, NULL, NULL, | |
12 NULL); | |
13 EXPECT_EQ(0u, nodes.size()); | |
14 | |
15 GtkSelectionData data; | |
16 data.data = NULL; | |
17 data.length = 0; | |
18 nodes = bookmark_utils::GetNodesFromSelection(NULL, &data, 0, NULL, NULL, | |
19 NULL); | |
20 EXPECT_EQ(0u, nodes.size()); | |
21 | |
22 nodes = bookmark_utils::GetNodesFromSelection(NULL, NULL, | |
23 gtk_dnd_util::CHROME_BOOKMARK_ITEM, NULL, NULL, NULL); | |
24 EXPECT_EQ(0u, nodes.size()); | |
25 | |
26 data.data = NULL; | |
27 data.length = 0; | |
28 nodes = bookmark_utils::GetNodesFromSelection(NULL, &data, | |
29 gtk_dnd_util::CHROME_BOOKMARK_ITEM, NULL, NULL, NULL); | |
30 EXPECT_EQ(0u, nodes.size()); | |
31 | |
32 guchar test_data[] = ""; | |
33 data.data = test_data; | |
34 data.length = 0; | |
35 nodes = bookmark_utils::GetNodesFromSelection(NULL, &data, | |
36 gtk_dnd_util::CHROME_BOOKMARK_ITEM, NULL, NULL, NULL); | |
37 EXPECT_EQ(0u, nodes.size()); | |
38 } | |
OLD | NEW |