| 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
| 6 | 6 |
| 7 #include "app/clipboard/scoped_clipboard_writer.h" | 7 #include "app/clipboard/scoped_clipboard_writer.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
| 11 #include "chrome/browser/bookmarks/bookmark_model.h" | 12 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 12 #include "chrome/browser/bookmarks/bookmark_utils.h" | 13 #include "chrome/browser/bookmarks/bookmark_utils.h" |
| 13 | 14 |
| 14 typedef testing::Test BookmarkUtilsTest; | 15 typedef testing::Test BookmarkUtilsTest; |
| 15 | 16 |
| 16 TEST_F(BookmarkUtilsTest, GetBookmarksContainingText) { | 17 TEST_F(BookmarkUtilsTest, GetBookmarksContainingText) { |
| 17 BookmarkModel model(NULL); | 18 BookmarkModel model(NULL); |
| 18 const BookmarkNode* n1 = | 19 const BookmarkNode* n1 = |
| 19 model.AddURL(model.other_node(), 0, L"foo bar", | 20 model.AddURL(model.other_node(), 0, L"foo bar", |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 ScopedClipboardWriter clipboard_writer(g_browser_process->clipboard()); | 119 ScopedClipboardWriter clipboard_writer(g_browser_process->clipboard()); |
| 119 clipboard_writer.WriteText(ASCIIToUTF16("foo")); | 120 clipboard_writer.WriteText(ASCIIToUTF16("foo")); |
| 120 } | 121 } |
| 121 | 122 |
| 122 // Now we shouldn't be able to paste from the clipboard. | 123 // Now we shouldn't be able to paste from the clipboard. |
| 123 EXPECT_FALSE( | 124 EXPECT_FALSE( |
| 124 bookmark_utils::CanPasteFromClipboard(model.GetBookmarkBarNode())); | 125 bookmark_utils::CanPasteFromClipboard(model.GetBookmarkBarNode())); |
| 125 } | 126 } |
| 126 #endif | 127 #endif |
| 127 | 128 |
| OLD | NEW |