Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1333)

Side by Side Diff: chrome/browser/bookmarks/bookmark_utils_unittest.cc

Issue 9232075: Have ScopedClipboardWriter and Clipboard::WriteObjects take a buffer parameter. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix build error. Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/bookmarks/bookmark_node_data.cc ('k') | chrome/browser/net/browser_url_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // Copy a node to the clipboard. 135 // Copy a node to the clipboard.
136 std::vector<const BookmarkNode*> nodes; 136 std::vector<const BookmarkNode*> nodes;
137 nodes.push_back(node); 137 nodes.push_back(node);
138 CopyToClipboard(&model, nodes, false); 138 CopyToClipboard(&model, nodes, false);
139 139
140 // And make sure we can paste a bookmark from the clipboard. 140 // And make sure we can paste a bookmark from the clipboard.
141 EXPECT_TRUE(CanPasteFromClipboard(model.bookmark_bar_node())); 141 EXPECT_TRUE(CanPasteFromClipboard(model.bookmark_bar_node()));
142 142
143 // Write some text to the clipboard. 143 // Write some text to the clipboard.
144 { 144 {
145 ui::ScopedClipboardWriter clipboard_writer(g_browser_process->clipboard()); 145 ui::ScopedClipboardWriter clipboard_writer(g_browser_process->clipboard(),
146 ui::Clipboard::BUFFER_STANDARD);
146 clipboard_writer.WriteText(ASCIIToUTF16("foo")); 147 clipboard_writer.WriteText(ASCIIToUTF16("foo"));
147 } 148 }
148 149
149 // Now we shouldn't be able to paste from the clipboard. 150 // Now we shouldn't be able to paste from the clipboard.
150 EXPECT_FALSE(CanPasteFromClipboard(model.bookmark_bar_node())); 151 EXPECT_FALSE(CanPasteFromClipboard(model.bookmark_bar_node()));
151 } 152 }
152 #endif 153 #endif
153 154
154 } // namespace 155 } // namespace
155 } // namespace bookmark_utils 156 } // namespace bookmark_utils
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_node_data.cc ('k') | chrome/browser/net/browser_url_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698