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

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

Issue 5512009: Remove unneeded browser_process.h includes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix linux build Created 10 years 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 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 "base/utf_string_conversions.h"
11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/bookmarks/bookmark_model.h" 11 #include "chrome/browser/bookmarks/bookmark_model.h"
13 #include "chrome/browser/bookmarks/bookmark_utils.h" 12 #include "chrome/browser/bookmarks/bookmark_utils.h"
14 13
14 #if !defined(OS_MACOSX)
James Hawkins 2010/12/05 17:58:47 #ifdef includes are supposed to be inline with the
15 #include "chrome/browser/browser_process.h"
16 #endif
17
15 typedef testing::Test BookmarkUtilsTest; 18 typedef testing::Test BookmarkUtilsTest;
16 19
17 TEST_F(BookmarkUtilsTest, GetBookmarksContainingText) { 20 TEST_F(BookmarkUtilsTest, GetBookmarksContainingText) {
18 BookmarkModel model(NULL); 21 BookmarkModel model(NULL);
19 const BookmarkNode* n1 = 22 const BookmarkNode* n1 =
20 model.AddURL(model.other_node(), 0, ASCIIToUTF16("foo bar"), 23 model.AddURL(model.other_node(), 0, ASCIIToUTF16("foo bar"),
21 GURL("http://www.google.com")); 24 GURL("http://www.google.com"));
22 const BookmarkNode* n2 = 25 const BookmarkNode* n2 =
23 model.AddURL(model.other_node(), 0, ASCIIToUTF16("baz buz"), 26 model.AddURL(model.other_node(), 0, ASCIIToUTF16("baz buz"),
24 GURL("http://www.cnn.com")); 27 GURL("http://www.cnn.com"));
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 { 123 {
121 ScopedClipboardWriter clipboard_writer(g_browser_process->clipboard()); 124 ScopedClipboardWriter clipboard_writer(g_browser_process->clipboard());
122 clipboard_writer.WriteText(ASCIIToUTF16("foo")); 125 clipboard_writer.WriteText(ASCIIToUTF16("foo"));
123 } 126 }
124 127
125 // Now we shouldn't be able to paste from the clipboard. 128 // Now we shouldn't be able to paste from the clipboard.
126 EXPECT_FALSE( 129 EXPECT_FALSE(
127 bookmark_utils::CanPasteFromClipboard(model.GetBookmarkBarNode())); 130 bookmark_utils::CanPasteFromClipboard(model.GetBookmarkBarNode()));
128 } 131 }
129 #endif 132 #endif
130
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698