| 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 "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 8 #include "base/scoped_clipboard_writer.h" | |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| 11 #include "chrome/browser/bookmarks/bookmark_model.h" | 11 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 12 #include "chrome/browser/bookmarks/bookmark_utils.h" | 12 #include "chrome/browser/bookmarks/bookmark_utils.h" |
| 13 | 13 |
| 14 typedef testing::Test BookmarkUtilsTest; | 14 typedef testing::Test BookmarkUtilsTest; |
| 15 | 15 |
| 16 TEST_F(BookmarkUtilsTest, GetBookmarksContainingText) { | 16 TEST_F(BookmarkUtilsTest, GetBookmarksContainingText) { |
| 17 BookmarkModel model(NULL); | 17 BookmarkModel model(NULL); |
| 18 const BookmarkNode* n1 = | 18 const BookmarkNode* n1 = |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 ScopedClipboardWriter clipboard_writer(g_browser_process->clipboard()); | 102 ScopedClipboardWriter clipboard_writer(g_browser_process->clipboard()); |
| 103 clipboard_writer.WriteText(ASCIIToUTF16("foo")); | 103 clipboard_writer.WriteText(ASCIIToUTF16("foo")); |
| 104 } | 104 } |
| 105 | 105 |
| 106 // Now we shouldn't be able to paste from the clipboard. | 106 // Now we shouldn't be able to paste from the clipboard. |
| 107 EXPECT_FALSE( | 107 EXPECT_FALSE( |
| 108 bookmark_utils::CanPasteFromClipboard(model.GetBookmarkBarNode())); | 108 bookmark_utils::CanPasteFromClipboard(model.GetBookmarkBarNode())); |
| 109 } | 109 } |
| 110 #endif | 110 #endif |
| 111 | 111 |
| OLD | NEW |