| 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 "chrome/browser/bookmarks/bookmark_utils.h" | 5 #include "chrome/browser/bookmarks/bookmark_utils.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.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 "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 node, WideToUTF16(L"fr\u00C4n\u00C7\u00D3s\u00CA"), string())); | 119 node, WideToUTF16(L"fr\u00C4n\u00C7\u00D3s\u00CA"), string())); |
| 120 EXPECT_TRUE(DoesBookmarkContainText(node, ASCIIToUTF16("fba"), string())); | 120 EXPECT_TRUE(DoesBookmarkContainText(node, ASCIIToUTF16("fba"), string())); |
| 121 EXPECT_TRUE(DoesBookmarkContainText(node, ASCIIToUTF16("FBA"), string())); | 121 EXPECT_TRUE(DoesBookmarkContainText(node, ASCIIToUTF16("FBA"), string())); |
| 122 } | 122 } |
| 123 | 123 |
| 124 #if !defined(OS_MACOSX) | 124 #if !defined(OS_MACOSX) |
| 125 #if defined(TOUCH_UI) | 125 #if defined(TOUCH_UI) |
| 126 // TODO(wyck): Functionality disabled on TOUCH_UI to work around clipboard hang | 126 // TODO(wyck): Functionality disabled on TOUCH_UI to work around clipboard hang |
| 127 // in http://crbug.com/96448 | 127 // in http://crbug.com/96448 |
| 128 #define MAYBE_CopyPaste FAILS_CopyPaste | 128 #define MAYBE_CopyPaste FAILS_CopyPaste |
| 129 #elif defined(USE_AURA) && !defined(OS_WIN) | |
| 130 // Clipboard not yet implemented on Linux Aura, see http://crbug.com/100348 | |
| 131 #define MAYBE_CopyPaste FAILS_CopyPaste | |
| 132 #else | 129 #else |
| 133 #define MAYBE_CopyPaste CopyPaste | 130 #define MAYBE_CopyPaste CopyPaste |
| 134 #endif | 131 #endif |
| 135 TEST(BookmarkUtilsTest, MAYBE_CopyPaste) { | 132 TEST(BookmarkUtilsTest, MAYBE_CopyPaste) { |
| 136 // Clipboard requires a message loop. | 133 // Clipboard requires a message loop. |
| 137 MessageLoopForUI loop; | 134 MessageLoopForUI loop; |
| 138 | 135 |
| 139 BookmarkModel model(NULL); | 136 BookmarkModel model(NULL); |
| 140 const BookmarkNode* node = model.AddURL(model.other_node(), | 137 const BookmarkNode* node = model.AddURL(model.other_node(), |
| 141 0, | 138 0, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 156 clipboard_writer.WriteText(ASCIIToUTF16("foo")); | 153 clipboard_writer.WriteText(ASCIIToUTF16("foo")); |
| 157 } | 154 } |
| 158 | 155 |
| 159 // Now we shouldn't be able to paste from the clipboard. | 156 // Now we shouldn't be able to paste from the clipboard. |
| 160 EXPECT_FALSE(CanPasteFromClipboard(model.bookmark_bar_node())); | 157 EXPECT_FALSE(CanPasteFromClipboard(model.bookmark_bar_node())); |
| 161 } | 158 } |
| 162 #endif | 159 #endif |
| 163 | 160 |
| 164 } // namespace | 161 } // namespace |
| 165 } // namespace bookmark_utils | 162 } // namespace bookmark_utils |
| OLD | NEW |